Pregunta de entrevista de D. E. Shaw India

2 coding questions based on greedy algorithms.