Pregunta de entrevista de Amazon

An easy leetcode question was asked