Pergunta de entrevista da empresa IXL Learning

Leetcode medium to hard, just do blind 75