Infosys Interview Question

DP question + Greedy algorithm + all fundamentals