Pregunta de entrevista de Amazon

Coding Question. Popular leetcode questions.