Question d’entretien chez Google

Greedy Approach question that is in leetcode.