Zillow Interview Question

Find the in-order successor of a node within a binary tree.

Interview Answer

Anonymous

Jun 10, 2016

Determine if the node sought is in the left subtree, or the right subtree. If left, track the last traversed node, in this case should always point to the parent. If right, find the minimum value.