em_misc icon indicating copy to clipboard operation
em_misc copied to clipboard

Question: Do the calculations in vebtree.c work only for trees that have a height that is a power of 2?

Open dhruvbird opened this issue 12 years ago • 1 comments

or do they work for trees of any height? https://github.com/bcopeland/em_misc/blob/master/vebtree.c

dhruvbird avatar Mar 26 '13 06:03 dhruvbird

Any specific calculations? In general, they should work for any height. Most of the power-of-two calculations arise because a complete binary tree has 2**height nodes, and the BFS numbering is used to address them.

bcopeland avatar Mar 26 '13 10:03 bcopeland