Binary Search Trees
What is a Binary Search Tree?
A Binary Search Tree (BST) is a type of binary tree in which each node has at most two children, and every node left child contains a value less than the node's value, while the right child contains a value greater than the node value.
Key Properties of Binary Search Trees:
- For any node, all values in its left subtree are smaller than its own value, and all values in its right subtree are greater.
- Efficient for search, insert, and delete operations.
- Can be balanced or unbalanced.
A Visual Example of a Valid BST:
For extra details on Binary Search Trees, please visit Wikipedia's page on Binary Search Trees.