Pregunta de entrevista de Anonymous

Leetcode easy medium question level