Find Kth Largest and Tree Ancestors | Meta Interview Question