Re: [algogeeks] Fixing Up The Binary Search Tree

2012-06-29 Thread Karthikeyan V.B
calculate the balance factor for all nodes and find any node with factor 1 or factor -1 and perform AVL rotation from that node -- 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.

Re: [algogeeks] Fixing Up The Binary Search Tree

2012-06-28 Thread atul anand
we can go for bottom up approch .so go the leftmost leaf node and then pass this node as a root to the function which implements AVL rotations.Do the same as we move back in the recursion i guess this will work as we are balancing the the left and right subtree of node say X before we

[algogeeks] Fixing Up The Binary Search Tree

2012-06-27 Thread Krishna Kishore
Suppose a Binary Search Tree which is unbalanced.is given. Write a routine to balance the Binary Search Tree. Send the Root of the BST as an argument to that routine. It has to Return the Root of the Balanced BST. Thanks In Advance. -- You received this message because you are subscribed to