Google interview question

one easy-ish question one dynamic programming