Pregunta de entrevista de IXL Learning

Hackerrank coding challenge, standard leetcode style questions.