Outgive Interview Question

typical lc hard dynamic programming problem