C++ 4ms simple recursive solution
class Solution {\n    public:\n    vector<vector<int>> levelOrder(TreeNode* root)\n    {\n    \tvector<vector<int>> result;\n    \trecur_levelOrder(result, root
    class Solution {\n    public:\n    vector<vector<int>> levelOrder(TreeNode* root)\n    {\n    \tvector<vector<int>> result;\n    \trecur_levelOrder(result, root, 0);\n    \treturn result;\n    }\n\n    void recur_levelOrder(vector<vector<int>> &result, TreeNode *root, int level)\n    {\n    \tif (!root)\n    \t{\n\t    \treturn;\n\t    }\n\t    if ((level+1) > result.size())\n\t    {\n\t\t    result.push_back(vector<int> {});\n\t    }\n\t    result[level].push_back(root->val);\n\t    recur_levelOrder(result, root->left, level+1);\n\t    recur_levelOrder(result, root->right, level+1);\n    }\n    };
['C++']