Functions for finding lowest common ancestors in binary trees in O(1) time, with O(n) preprocessing.
Documentation
Index
is used as a node identifier, so that the user can refer to tree nodes
in a random-access fashion.
Functions for finding lowest common ancestors in binary trees in O(1) time, with O(n) preprocessing.
Index
is used as a node identifier, so that the user can refer to tree nodes
in a random-access fashion.