If the left sub-tree isn’t empty, all nodes on that sub-tree is smaller than the node value
If the right sub-tree isn’t empty, all nodes on that sub-tree is bigger than the node value
Its left sub-tree and right sub-tree are also binary search tree (二叉搜索树)
Tips in solving Leetcode Question
Handling relationship between the current node & its previous node
Use prevNode to keep track of the previous smaller node or its parent node
Handy in solving some problems
Traverse nodes from smallest to biggest
We use In-Order Traversal (left first, then right) to print the nodes inside Binary Search Tree (二叉搜索树) from the smallest to the biggest - useful in finding the minimum absolute difference among the nodes
Every value of node of the original BST is changed to the original value of node plus the sum of all value of nodes greater than the value of the original node of in BST