TikTok Interview Question

Basic leetcode tree and binary search