You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hint 1
Disconnect node p from its parent and append it to the children list of node q.
Hint 2
If q was in the sub-tree of node p (case 1), get the parent node of p and replace p in its children list with q.
Hint 3
If p was the root of the tree, make q the root of the tree.