Goldman Sachs Interview Question
Software Engineer / DevelopersCountry: India
Interview Type: In-Person
Height balanced tree with n elements has max height logn in worst case while non height balanced tree's height can go up to n. In AVL tree nodes are arranged in such manner that it achieves HB property where sibiling height of each node differ by 1 while in RB tree HB property is achieved by coloring the nodes and following special ordering to make hieght balanced.
A height balance tree is where the height of left sub-tree and right sub-tree of the root is either same or differs by 1.
- Anonymous December 07, 2011