Pregunta de entrevista de Amazon

Basic algorithm questions that you can find on leetcode