Infosys interview question

Coding questions based on Greedy algorithms and Dynamic programming