Pregunta de entrevista de PathAI

A difficult dynamic programming question