标签: 二叉树
-
二叉搜索树的Morris中序遍历(O(1)空间)思路
关于二叉树的遍历,使用栈递归或者仿栈循环都是需要O(N)的空间,Morris Traversal保证了空间为O…
-
889. Construct Binary Tree from Preorder and Postorder Traversal
Return any binary tree that matches the given preorder …
-
leetcode讲解–513. Find Bottom Left Tree Value
Given a binary tree, find the leftmost value in the las…
-
leetcode讲解–700. Search in a Binary Search Tree
Given the root node of a binary search tree (BST) and a…
-
leetcode讲解–951. Flip Equivalent Binary Trees
For a binary tree T, we can define a flip operation as …
-
leetcode讲解–617. Merge Two Binary Trees
Given two binary trees and imagine that when you put on…
-
leetcode讲解–814. Binary Tree Pruning
We are given the head node root of a binary tree, where…