Pregunta de entrevista de Amazon Web Services

solve a linked list problem