Difference Between Binary Tree and Binary Search Tree: Subtree
Difference Between Binary Tree and Binary Search Tree: Subtree
Imp formula
The left subtree of a node contains only nodes with keys less than the node's key.
The right subtree of a node contains only nodes with keys greater than the node's key.
The left and right subtree each must also be a binary search tree.
Each node can have up to two successor nodes.
There must be no duplicate nodes.
A unique path exists from the root to every other node.
3
/ \
4 5
Binary Search Tree: In binary search tree, the left child contains nodes with values less than
the parent node and where the right child only contains nodes with values greater than or
equal to the parent.
4
/ \
3 5