MathWorks Interview Question

DP-style leetcode questions from the "hard" category.