Pergunta de entrevista da empresa TikTok

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