Maybe some will have fun with this one. Reorganize a fully left-skewed BST (no node has a right child) with N nodes to form a perfectly balanced BST in O(N) time with O(log N) space. Perfectly balanced means having height no more than ceiling(log_2 (N+1)) .
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---