Cisco interview question

Write logic to reverse a linked list.