Numbrs interview question

Dynamic programming problem on HackerRank platform.