CPKit
v1.6.1

Binary Search Tree (BST)

AlgorithmsEasy

Insert, delete, and lookup keys in BST arrays, monitoring traversal paths.

Alt+Shift+B

Configuration Panel

Tree Layout Canvas

Double-click empty canvas to create root, select node to add child or delete.

Time Complexity

O(log N) average / O(N) worst case

Auxiliary Space Complexity

O(N) storage size
Conceptual Overview

A Binary Search Tree (BST) is a node-based binary tree data structure where for each node, its left subtree contains only nodes with keys less than the node's key, and its right subtree contains only nodes with keys greater than the node's key.

Algorithm Mechanism

Supports lookup, insertion, and deletion operations. When balanced, operations take logarithmic time; however, skewed insertions degrade runtime performance to linear.

Source: CP-Algorithms reference guide