Google interview question

Live coding interview with the task on dynamic programming.