摘要:
原题链接在这里:https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/ 题目: Given a binary tree, find the lowest common ancestor (LCA) of two g 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/ 题目: Given a binary search tree (BST), find the lowest common anc 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/invert-binary-tree/ 题目: Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3 1 题解: 既可以自顶向下 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/symmetric-tree/ 题目: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/binary-tree-level-order-traversal-ii/ 题目: Given a binary tree, return the bottom-up level order traversal of its 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/same-tree/ 题目: Given two binary trees, write a function to check if they are equal or not. Two binary trees are 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/minimum-depth-of-binary-tree/ 题目: Given a binary tree, find its minimum depth. The minimum depth is the number o 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/maximum-depth-of-binary-tree/ 题目: Given a binary tree, find its maximum depth. The maximum depth is the number o 阅读全文
摘要:
原题链接在这里:https://leetcode.com/problems/balanced-binary-tree/ 题目: Given a binary tree, determine if it is height-balanced. For this problem, a height-ba 阅读全文