Amazon Interview Question

Write a code for reversed singly linked list.