Pergunta de entrevista da empresa Intel Corporation

dynamic programming problem was a 2d one.