/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* struct TreeNode *left;
* struct TreeNode *right;
* };
*/
int findBottomLeftValue(struct TreeNode* root) {
if(!root->left&&!root->right) return root->val;
struct TreeNode* queue[20000];
int front=0,tail=1,size=1;
queue[front]=root;
struct TreeNode* head=root;
while(size!=0){
struct TreeNode* temp=queue[front++];
head=temp;
size--;
if(temp->right) {
queue[tail++]=temp->right;
size++;
}
if(temp->left) {
queue[tail++]=temp->left;
size++;
}
}
return head->val;
}
queue!!
标签:TreeNode,struct,temp,找树,queue,左下角,root,513,size From: https://www.cnblogs.com/llllmz/p/18072769