Pregunta de entrevista de IXL Learning

A leetcode medium question was asked.