Sunday, September 26, 2010

Fill level order next and prev links in binary search tree

In a binary search tree, each node has 2 extra pointers namely levelOrderNext and levelOrderPrev. You need to give an algorithm with constant space so that the nodes are linked properly in level order in CONSTANT space.

No comments:

Post a Comment