MathWorks Interview Question

Pretty regular leetcode type questions