Pregunta de entrevista de Amazon

They asked greedy problems mixed with matrix