Amazon Interview Question

Subroot in a Binary tree with longest leaf-to-leaf path

Interview Answer

Anonymous

Feb 23, 2013

in binary tree the parents and child are attached . the insert will be done recursively the insert call will return true if the height of the sub-tree has changed. the parent is the root & child is sub-root of the binary tree