Infosys interview question

I was asked dp based questions.