Vyond interview question

a coding test question for easy dynamic programming