3 step C++ iterative solution | Easy to Understand | O(1) space in-place
Steps:\n1) Find the middle node of the linked list\n2) Reverse the second half of the linked list\n3) Merge two linked lists\n\n\t\tGiven:           1 --> 2 -->
**Steps:**\n1) Find the middle node of the linked list\n2) Reverse the second half of the linked list\n3) Merge two linked lists\n\n\t\tGiven:           1 --> 2 --> 3 --> 4 --> 5\n\t\t\n\t\tAfter Step 1:    1 --> 2 --> 3 --> 4 --> 5\n\t\t\t\t\t\t\t\t      |\n\t\t\t\t\t\t\t\t     slow\n\t\t\t\t\t\t\t\t\t\n\t\tAfter Step 2:    1 --> 2 --> 3            5--> 4\n                                                  |\n\t\t\t\t\t\t             \t\t  \t  prev\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tAfter Step 3:    1 --> 5 --> 2 --> 4 --> 3\n```\nclass Solution {\npublic:\n    void reorderList(ListNode* head) {\n        if(!head->next) return;\n        \n        // Finding middle of linked list\n        ListNode* slow=head;\n        ListNode* fast=head;\n        while(fast->next and fast->next->next){\n            slow=slow->next;\n            fast=fast->next->next;\n        }\n        \n        // Reversing the second half of the linked list\n        ListNode* prev=NULL;\n        ListNode* curr = slow->next;\n        while(curr){\n            ListNode* nextt = curr->next;\n            curr->next = prev;\n            prev = curr;\n            curr=nextt;\n        }\n        slow->next = NULL;\n        \n        // Merge two lists \n        ListNode* head1=head;\n        ListNode* head2=prev;\n        while(head2){\n            ListNode* temp = head1->next;\n            head1->next = head2;\n            head1=head1->next;\n            head2= temp;\n        }\n        \n    }\n};\n\n\n\n
['Linked List', 'C', 'Iterator']