MathWorks interview question

questions using leet code concepts