easy code in c++
\n\n# Code\n\n/**\n * Definition for a binary tree node.\n * struct TreeNode {\n *     int val;\n *     TreeNode *left;\n *     TreeNode *right;\n *     TreeNod
\n\n# Code\n```\n/**\n * Definition for a binary tree node.\n * struct TreeNode {\n *     int val;\n *     TreeNode *left;\n *     TreeNode *right;\n *     TreeNode() : val(0), left(nullptr), right(nullptr) {}\n *     TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}\n *     TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}\n * };\n */\nclass Solution {\npublic:\n    int findBottomLeftValue(TreeNode* root) {\n        queue<TreeNode*> q;\n        q.push(root);\n        int n=0;\n        TreeNode* temp=nullptr;\n        int leftMostVal=0;\n        while(!q.empty()) {\n            n=q.size();\n            leftMostVal=q.front()->val;\n            for(int i=0;i<n;i++) {\n                temp=q.front();\n                q.pop();\n                if(temp->left) {\n                    q.push(temp->left);\n                }\n                if(temp->right) {\n                    q.push(temp->right);\n                }\n            }\n        }\n        return leftMostVal;\n    }\n};\n```
['C++']