Reverse a linked list

  1. walk through the linked list
  2. set node.next to prev
  3. store current node the prev
  4. loop

Now, extract the m to n linked list, reverse it, and join the 3 parts into a new linked list.