Clear C Solution
\n/**\n * Definition for singly-linked list.\n * struct ListNode {\n *     int val;\n *     struct ListNode *next;\n * };\n */\n \nstruct ListNode* getMid(struc
```\n/**\n * Definition for singly-linked list.\n * struct ListNode {\n *     int val;\n *     struct ListNode *next;\n * };\n */\n \nstruct ListNode* getMid(struct ListNode*);\nstruct ListNode* reverseList(struct ListNode*);\nvoid merge(struct ListNode*, struct ListNode*);\n\nvoid reorderList(struct ListNode* head) {\n    if(head == NULL || head->next == NULL || head->next->next == NULL) return;\n    \n    struct ListNode* mid = getMid(head);\n    struct ListNode* secondHalf = mid->next;\n    mid->next = NULL;\n    secondHalf = reverseList(secondHalf);\n    merge(head, secondHalf);\n    \n}\n\nstruct ListNode* getMid(struct ListNode* head){\n    struct ListNode* fast = head;\n    struct ListNode* slow = head;\n    while(fast->next!=NULL && fast->next->next!=NULL){\n        fast = fast->next->next;\n        slow = slow->next;\n    }\n    return slow;\n}\n\nstruct ListNode* reverseList(struct ListNode* head) {\n    struct ListNode* tail = NULL;\n    while(head!=NULL){\n        struct ListNode* cur = head;\n        head = head->next;\n        \n        cur->next = tail;\n        tail = cur;\n    }\n    \n    return tail;\n}\n\nvoid merge(struct ListNode* head1, struct ListNode* head2){\n    struct ListNode* head = head1;\n    \n    while(head2!=NULL){\n        struct ListNode* next = head2->next;\n        head2->next = head->next;\n        head->next = head2;\n        \n        head = head->next->next;\n        head2 = next;\n    }\n}\n```
[]