摘要:
LC654. 最大二叉树 内存消耗只击败10% TreeNode* buildTree(vector<int> nums) { int max = nums[0]; int index = 0; for (int i = 1; i < nums.size(); i++) { if (nums[i] 阅读全文
摘要:
LC513. 找树左下角的值 这道题用层次遍历,更容易做 int findBottomLeftValue(TreeNode* root) { int result = 0; int size = 0; queue<TreeNode*> que; TreeNode* curr = nullptr; i 阅读全文