Pregunta de entrevista de LeetCode

i had greedy algorithm questions