Easily Expalined Step by Step Code. (100% Beats and 0ms Runtime)
Intuition\nFind the middle of the linked list. For Example:-\n     1->2->3->4->5\nHere, middle =3;\nThen reverse the second half of the Linked List (i.e. 4->5),
# Intuition\nFind the middle of the linked list. For Example:-\n     1->2->3->4->5\nHere, middle =3;\nThen reverse the second half of the Linked List (i.e. 4->5), so after reversing the list will be like 5->4\nNow, merege both list in ordered way like one element of 1st half linkedlist (i.e 1->2->3) and one element of second half list (i.e 5->4) so after merging the list will be like:-\n  1->5->2->4->3\nwhich is the required answer.\n\n# Approach\nFor finding the middle of the linked list we can use slow and fast pointer approach.\nFor reversing the list we can use the [Reverse linkedList I ](https://leetcode.com/problems/reverse-linked-list/solutions/3111776/100-beats-and-0ms-runtime-easy-java-solution/?orderBy=most_votes) approach.\nThen we can merge list one by one.\n\n# Complexity\n- Time complexity: $$O(n)$$\n \n\n- Space complexity: $$O(1)$$\n \n \n```Java []\n/**\n * Definition for singly-linked list.\n * public class ListNode {\n *     int val;\n *     ListNode next;\n *     ListNode() {}\n *     ListNode(int val) { this.val = val; }\n *     ListNode(int val, ListNode next) { this.val = val; this.next = next; }\n * }\n */\nclass Solution {\n    public void reorderList(ListNode head) {\n        // if head will be null or head.next will be null simply return ;\n        if(head==null || head.next==null)return ;\n\n  //finding middle element\n        ListNode slow = head;\n        ListNode fast= head;\n        while(fast!=null && fast.next!=null){\n            slow=slow.next;\n            fast=fast.next.next;\n        }\n       \n// reversing the second half of the list\n       ListNode newNode = reverseList(slow.next);\n      // breaking the list from the middle\n        slow.next=null;\n   //merging both list\n       //first half list pointer\n       ListNode curr = head;\n       //second half list pointer\n       ListNode dummy = newNode;\n       while(curr!=null && dummy!=null){\n             //pointer to store next element of curr(1st half list)\n           ListNode temp = curr.next;\n           //link element of 1st half to that of second half\n           curr.next=dummy;\n           //pointer to store next element of dummy(2nd half list)\n           ListNode temp2=dummy.next;\n           //link the rest of the first half list\n           dummy.next=temp;\n           //increment curr and dummy pointer to do the same thing again and again util we reach end of the any one list or both list\n           curr=temp;\n           dummy=temp2;\n       }\n\n    }\n\n   // method to reverse the linkedList\n    public ListNode reverseList(ListNode node){\n        ListNode prev = null;\n        ListNode curr = node;\n        ListNode next = null;\n        while(curr!=null){\n            next=curr.next;\n            curr.next=prev;\n            prev=curr;\n            curr=next;\n        }\n         \n        return prev;\n    }\n}\n```\n```C++ []\n/**\n * Definition for singly-linked list.\n * struct ListNode {\n *     int val;\n *     ListNode *next;\n *     ListNode() : val(0), next(nullptr) {}\n *     ListNode(int x) : val(x), next(nullptr) {}\n *     ListNode(int x, ListNode *next) : val(x), next(next) {}\n * };\n */\n#include <iostream>\n\nusing namespace std;\n\n// Definition for singly-linked list\n \n\nclass Solution {\npublic:\n    // Function to reorder a linked list\n    void reorderList(ListNode* head) {\n        // If head is null or there\'s only one node, no reordering needed\n        if (!head || !head->next)\n            return;\n\n        // Find the middle of the list\n        ListNode* slow = head;\n        ListNode* fast = head;\n        while (fast && fast->next) {\n            slow = slow->next;\n            fast = fast->next->next;\n        }\n\n        // Reverse the second half of the list\n        ListNode* newNode = reverseList(slow->next);\n        slow->next = nullptr;\n\n        // Merge both halves of the list\n        ListNode* curr = head;\n        ListNode* dummy = newNode;\n        while (curr && dummy) {\n            ListNode* temp = curr->next;\n            curr->next = dummy;\n            ListNode* temp2 = dummy->next;\n            dummy->next = temp;\n            curr = temp;\n            dummy = temp2;\n        }\n    }\n\n    // Function to reverse a linked list\n    ListNode* reverseList(ListNode* node) {\n        ListNode* prev = nullptr;\n        ListNode* curr = node;\n        ListNode* next = nullptr;\n        while (curr) {\n            next = curr->next;\n            curr->next = prev;\n            prev = curr;\n            curr = next;\n        }\n\n        return prev;\n    }\n};\n\n \n\n```\n \n\n\n[Nishant Kumar](https://leetcode.com/KumarNishantGunjan/)\n\n![cc404213-285c-48ca-bce1-256072316360_1675559254.9353127.png](https://assets.leetcode.com/users/images/9978b049-7731-4e29-89dd-5161c11c5b9e_1675649148.1483843.png)\n
['Linked List', 'C++', 'Java']