cpp solution using a stack and a queue
c++\nvoid reorderList(ListNode* head) {\n    stack<ListNode*> s;\n    queue<ListNode*> q;\n    int len = 0, count = 0;\n    ListNode dummyHead(0);\n    ListNode
```c++\nvoid reorderList(ListNode* head) {\n    stack<ListNode*> s;\n    queue<ListNode*> q;\n    int len = 0, count = 0;\n    ListNode dummyHead(0);\n    ListNode *p = head;\n    while(p){\n        s.push(p);\n        q.push(p);\n        p = p->next;\n        len++;\n    }\n    p = &dummyHead;\n    while(count < len){\n        p->next = q.front();\n        q.front()->next = s.top();\n        p = s.top();\n        q.pop();\n        s.pop();\n        count += 2;\n    }\n    p->next = NULL;\n}\n```
['C++']