Intel Corporation interview question

dynamic programming problem was a 2d one.