Question d’entretien chez Swiggy

Question related to greedy algorithm.