Domanda di colloquio di TikTok

greedy+binary search, mid question, and an array hard question