Solve BST and Grid Query Problems | Uber Coding Question