Infosys Interview Question

mostly about overlapping concepts and dynamic programming