Accenture interview question

Python coding question on dynamic programming