Google interview question

binary tree successor