<commit_before><commit_msg>C++ 0143<commit_after>/**
 * Definition for singly-linked list.
 * struct ListNode {
 *     int val;
 *     ListNode *next;
 *     ListNode(int x) : val(x), next(NULL) {}
 * };
 */
class Solution {
public:
    void reorderList(ListNode *head) {
        ListNode *p1 = head, *p2 = head;
        if (head == nullptr) return;
        if (head->next == nullptr) return;
        if (head->next->next == nullptr) return;
        while ( p2->next && p2->next->next) {
            p1 = p1->next;
            p2 = p2->next->next;
        }
        auto half_head = p1->next;
        p1->next = nullptr;
        vector<ListNode*> next_list;
        for (auto p = half_head; p; p = p->next) {
            next_list.push_back(p);
        }
        auto p = head;
        while (next_list.size()) {
            auto t = next_list.back();
            next_list.pop_back();
            t->next = p->next;
            p->next = t;
            p = t->next;
        }
    }
};

{'fraction_non_alphanumeric': 0.15517241379310345, 'fraction_numerical': 0.014198782961460446, 'mean_word_length': 1.632, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7667710', 'n_tokens_mistral': 332, 'n_tokens_neox': 328, 'n_words': 76}