Pregunta de entrevista de Amazon

Write a code for reversed singly linked list.