Salesforce Interview Question

Question was about dynamic programming...