Pergunta de entrevista da empresa IXL Learning

standard leetcode questions, medium difficulty