ABC interview question

Reverse a Linked List with given head nodes.