Python in place solution with comments (two pointers).
For linked list 1->2->3->4-5, the code first makes the list to be 1->2->3->4<-5 and 4->None, then make 3->None, for even number linked list: 1->2->3->4, make fi
For linked list 1->2->3->4-5, the code first makes the list to be 1->2->3->4<-5 and 4->None, then make 3->None, for even number linked list: 1->2->3->4, make first 1->2->3<-4 and 3->None, and lastly do not forget to make 2->None. \n    \n    def reorderList(self, head):\n        if not head:\n            return\n        # ensure the first part has the same or one more node\n        fast, slow = head.next, head\n        while fast and fast.next:\n            fast = fast.next.next\n            slow = slow.next\n        # reverse the second half\n        p = slow.next\n        slow.next = None\n        node = None\n        while p:\n            nxt = p.next\n            p.next = node\n            node = p\n            p = nxt\n        # combine head part and node part\n        p = head\n        while node:\n            tmp = node.next\n            node.next = p.next\n            p.next = node\n            p = p.next.next #p = node.next\n            node = tmp
['Two Pointers', 'Python']