Adobe Interview Question

Close enough to diameter of Binary Search Tree