Question d’entretien chez Amazon

Write a code for reversed singly linked list.