Saturday, February 18, 2012

Rank of a node in a Order Statistic Binary Tree

You have a binary tree where each node knows the number of nodes in its sub-tree (including itself). Given a node n and an int k, write a function to return the kth node in an in-order traversal. Can you do this non-recursively?




No comments:

Post a Comment