Pregunta de entrevista de Microsoft

Technical question, coding/leetcode type of problem