Describe how to clone a LinkedBinaryTree instance representing a (not
necessarily proper) binary tree, with use of the add _left and add _right
methods.
Give an efficient algorithm that computes and prints, for every positionp
of a treeT, the element ofpfollowed by the height ofp’s subtree.
Give anO(n)-time algorithm for computing the depths of all positions of
a treeT, wherenis the number of nodes ofT.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here