Google Interview Question

Main: Tree, Time complexity Follow up: Binary Search