Google interview question

recursion and dynamic programming