Pregunta de entrevista de Amazon

Two questions in Data Structures and algorithms