Oracle interview question

2d array and dp related questions