MathWorks Interview Question

Technical interview was a leetcode hard backtracking