Z

Binary Search Tree Visualizer — Insert, Search, Delete

Interactive binary search tree — insert, search, delete with an animated tree, step controls and pseudocode. Runs in your browser.

Free No signup Client-side Privacy friendly Updated

/

Pseudocode

Run an operation to see its steps.

How to use

  1. 1 Type a number and press Insert to add it — watch the search for its spot.
  2. 2 Press Search to trace the path to a value, or Delete to remove one.
  3. 3 Use Random to insert a random value, or Clear to start over.
  4. 4 Step back and forward through any operation, and follow the highlighted pseudocode.

Why use this tool

  • See the BST rule in action: smaller values go left, larger go right.
  • Watch all three delete cases — leaf, one child, and two children (in-order successor).
  • Understand why a balanced BST gives O(log n) search and an unbalanced one degrades to O(n).
  • Runs entirely in your browser. No signup, no uploads.

Frequently asked questions

What is a binary search tree?

A binary search tree (BST) is a binary tree where every node’s left subtree holds smaller values and its right subtree holds larger values, so an in-order traversal yields the values in sorted order.

What is the time complexity of BST operations?

Insert, search, and delete are O(h), where h is the tree height — O(log n) when balanced, but O(n) in the worst case (a degenerate, list-like tree).

How does deletion work when a node has two children?

The node’s value is replaced by its in-order successor (the smallest value in its right subtree), and that successor node is then removed — preserving the BST ordering.

How do I keep a BST balanced?

Use a self-balancing variant such as an AVL tree or a red-black tree, which perform rotations on insert/delete to keep the height O(log n).

What is Binary Search Tree Visualizer?

A Binary Search Tree Visualizer is an interactive tool that animates insert, search, and delete on a BST — a binary tree where every left subtree holds smaller values and every right subtree holds larger values. It shows the traversal path for each operation and all three deletion cases.

Summary

Binary Search Tree Visualizer is a free algorithm utility by Zerethon Tools. Interactive binary search tree — insert, search, delete with an animated tree, step controls and pseudocode. Runs in your browser. Runs entirely in the browser — no signup, no upload.

Category
Algorithm
Pricing
Free
Privacy
Browser-based
Signup
Not required

Privacy

Your data never leaves your browser unless explicitly stated. Binary Search Tree Visualizer runs entirely client-side — no server upload, no logging, no tracking of your input.

Related tools

Build, share, and grow on Zerethon Social

Free signup. Earn points, collect achievements, and connect with creators worldwide.

Try Zerethon free