Pregunta de entrevista de MathWorks

Technical interview was a leetcode hard backtracking