中序遍历
Data Structures & Algorithms · 6 notes
- Unique Binary Search Treeshistorical
Given an integer n, determine how many binary search trees can be formed using nodes 1 ... n.
- Binary Tree Inorder Traversalhistorical
Given the root root of a binary tree, return its inorder traversal.
- Construct Binary Tree from Preorder and Inorder Traversalhistorical
Construct a binary tree from its preorder traversal and inorder traversal.
- Binary Tree Preorder, Inorder, and Postorder Traversalhistorical
Print all nodes of a binary tree in preorder, inorder, and postorder respectively.
- Convert BST to Greater Treehistorical
Given the root of a binary search tree whose node values are distinct, convert it to a Greater Sum Tree so that the new value of each node equals the sum of all values in the original tree that are greater than or equal to node.val.
- Validate Binary Search Treehistorical
Given a binary tree, determine whether it is a valid binary search tree.