Pregunta de entrevista de MathWorks

LeetCode type question for Algorithm and data structure