Code for problem "Reverse Linked List II".