Binary Search Tree
  
   Step-by-Step Animation   Animation Speed 
Elaboration:
?
Binary Search Tree: It has the following properties:
1. If the left subtree is not empty, the values of all nodes on the left subtree are less than its rooted node
2. If the right subtree is not empty, the values of all nodes on the right subtree are greater than its rooted node
API explanation:
1. Insert: Insert a new node - average O(log(n)), worst case O(n)
2. Delete: Deleted a new node given a key - average O(log(n)), worst case O(n)
3. Find: Find the node given a key - average O(log(n)), worst case O(n)
4. Inorder Print: Print keys in ascending order - O(n)
5. Balance Tree: Rebalance the tree with sorted keys - O(n)
6. Clear Tree: Clear the entire tree
二叉查找树定义:二叉查找树存在两种情况,要么它是一棵空树,要么就是具有下列性质的二叉树: 若它的左子树不空,则左子树上所有结点的值均小于它的根结点的值; 若它的右子树不空,则右子树上所有结点的值均大于它的根结点的值; 它的左、右子树也分别为二叉排序树。
API explanations:
1. Insert: Insert a new node - average O(log(n)), worst case O(n)
2. Delete: Deleted a new node given a key - average O(log(n)), worst case O(n)
3. Find: Find the node given a key - average O(log(n)), worst case O(n)
4. Inorder Print: Print keys in ascending order - O(n)
5. Balance Tree: Rebalance the tree with sorted keys - O(n)
6. Clear Tree: Clear the entire tree