Pregunta de entrevista de Bloomberg

2 Leetcode medium difficulty within 1 hour