BST - Binary Search Tree
Date: 2022-12-27Last modified: 2023-03-12
Table of contents
What is Binary Search Tree?
A Binary Search Tree is a node-based binary tree data structure which has the following properties:
- The left subtree of a node contains only nodes with keys lesser 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.
- There must be no duplicate nodes.
BST are guaranteed height of O(log n) for n items
See Red-Black Tree