Domanda di colloquio di Google

Greedy Approach question that is in leetcode.