Esko Interview Question

greedy algorithm