Turing interview question

The questions were array based on dynamic programming question