Pregunta de entrevista de Intuit

Dynamic Programming question and sliding window question