Binary Search Tree
1. Has2 child like binary tree
2. Left child < parent
3. Right child > parent
4. No same value in
Binary Search Tree Operation
1. Insert : Input a data to a tree, if the data inputted is bigger than the parent, it will be put in the right else , left
2. Delete : Deleting a data from tree with condition:
1.If the deleted data don’t have a child, immediately deleted.
2.If the deleted data has 1 child, the previous data will be connected to other child , then deleted
3.If the deleted data has 2 child, then either one of the child will change the position of the deleted data
3.Searching : Searching a data from a tree. Because Binary Search Tree put the small data in left and big in right, searching in Binary Search Tree is more efficient. If the data searched is bigger, then go to the right, else to the left.
If the data wasn’t found in left or right, then the search result in failure, this operation is done repeatedly until it found a result.