Awesome Slow Fast Logic
\n\n# Fast And Slow Logic\n\nclass Solution:\n    def reorderList(self, head: Optional[ListNode]) -> None:\n        # divide the linked list\n        slow,fast=
\n\n# Fast And Slow Logic\n```\nclass Solution:\n    def reorderList(self, head: Optional[ListNode]) -> None:\n        # divide the linked list\n        slow,fast=head,head.next\n        while fast and fast.next:\n            slow=slow.next\n            fast=fast.next.next\n        second=slow.next\n        # making Null of half linked list\n        prev=slow.next=None\n        # reverse the end linked list\n        while second:\n            nxt=second.next\n            second.next=prev\n            prev=second\n            second=nxt\n        # merging the divided linked list\n        first,last=head,prev\n        while last:\n            nxt1,nxt2=first.next,last.next\n            first.next=last\n            last.next=nxt1\n            first,last=nxt1,nxt2\n        \n```\n# please upvote me it would encourage me alot\n
['Python3']