🔥🔥🔥🔥🔥 Beat 99% 🔥🔥🔥🔥🔥 EASY 🔥🔥🔥🔥🔥🔥
\n\n\n# Code\n\n# Definition for singly-linked list.\n# class ListNode(object):\n#     def __init__(self, val=0, next=None):\n#         self.val = val\n#       
[![Screenshot 2024-03-22 175737.png](https://assets.leetcode.com/users/images/310627c4-9a9b-4450-b29d-0cb034cb78f9_1711158733.326355.png)](https://leetcode.com/problems/reorder-list/submissions/1211291357/)\n\n\n# Code\n```\n# Definition for singly-linked list.\n# class ListNode(object):\n#     def __init__(self, val=0, next=None):\n#         self.val = val\n#         self.next = next\nclass Solution(object):\n    # Function for reversing\n    def reverse(self, head):\n        prev = None\n        current = head\n        while current:\n            prev, prev.next, current = current, prev, current.next\n        return prev\n    \n    def reorderList(self, head):\n        """\n        :type head: ListNode\n        :rtype: None Do not return anything, modify head in-place instead.\n        """\n        if head is None:\n            return\n\n        fast = head.next\n        slow = head\n        # Catch the Middle of List (slow)\n        while fast and fast.next:\n            fast = fast.next.next\n            slow = slow.next\n        # Cut Middle of list then Reverse it\n        rev = self.reverse(slow.next)\n        slow.next = None\n\n        while rev:\n            h_next = head.next\n            r_next = rev.next\n            head.next = rev\n            rev.next = h_next\n            rev = r_next\n            head = h_next  \n```
['Python', 'Python3']