Compass interview question

Questions on dynamic programming and greedy algorithms