Google interview question

q1- dynamic programing question aa