Question d’entretien chez MathWorks

Medium Leetcode Question for Tech phone screen