Enphase Energy Interview Question

DSA Question on DYnamic Programming