All On Block interview question

question on dynamic programming and from my resume