<commit_before><commit_msg>Binary Tree Level Order Traversal<commit_after>/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *     TreeNode *left;
 *     TreeNode *right;
 *     TreeNode(int x) : val(x), left(NULL), right(NULL) {}
 * };
 */
class Solution {
public:
    vector<vector<int>> levelOrder(TreeNode* root) {
        vector<vector<int>> ret;
        queue<TreeNode*> q;
        if(root) q.push(root);
        while(!q.empty()){
            int n = q.size();
            vector<int> inner;
            for(int i=0;i<n;i++){
                auto aux = q.front();
                q.pop();
                inner.push_back(aux->val);
                if(aux->left) q.push(aux->left);
                if(aux->right) q.push(aux->right);
            }
            ret.push_back(inner);
        }
        return ret;
    }
};
{'fraction_non_alphanumeric': 0.15690866510538642, 'fraction_numerical': 0.00117096018735363, 'mean_word_length': 1.731629392971246, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 14, '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': '759526', 'n_tokens_mistral': 274, 'n_tokens_neox': 267, 'n_words': 56}