Back to Developer Roadmap

Binary Search Trees

src/data/roadmaps/datastructures-and-algorithms/content/[email protected]

4.0907 B
Original Source

Binary Search Trees

A Binary Search Tree (BST) is a type of binary tree data structure where each node carries a unique key (a value), and each key/node has up to two referenced sub-trees, the left and right child. The key feature of a BST is that every node on the right subtree must have a value greater than its parent node, while every node on the left subtree must have a value less than its parent node. This property must be true for all the nodes, not just the root. Due to this property, searching, insertion, and removal of a node in a BST perform quite fast, and the operations can be done in O(log n) time complexity, making it suitable for data-intensive operations.

Visit the following resources to learn more: