ChatDiagram
computer science · data structures

Binary search tree insertion example.

A binary search tree stores ordered values in a branching structure. At every node, values in the left subtree are smaller and values in the right subtree are larger. This drawing makes that rule visible for a short insertion sequence, which is useful when learning how a tree changes one value at a time. Use it to check a homework solution, explain a search path or prepare a traversal exercise. For duplicate values, define a consistent policy before drawing the tree, such as storing a count or sending equal values to one side.

Tipo OrganogramaNorma Reingold-Tilford tidy treeMecanismo schematex-orgchartAtualizado 24/09/2026
Binary Search Tree from Insertions
Drawing preview
A solicitação

“Create a binary search tree from the insertion order 50, 30, 70, 20, 40, 60, 80 and 10, with 50 as the root and every smaller value on the left branch.”

Depois, tenteInsert 65 into the tree.Add 75 as the left child of 80.
O que há neste desenho

Entenda as decisões por trás dele.

01Root value

Start the tree at 50.

02Ordering rule

Put smaller values left and larger values right.

03Insertion order

Keep the given sequence when placing nodes.

Use this example when teaching or checking basic BST insertion.

Ver todos os modelos de organograma →

Perguntas frequentes

Dúvidas comuns

What makes this a binary search tree?

Each node has values smaller on the left and larger on the right.

Why does insertion order matter?

The same values can make different valid tree shapes in different orders.

Can a BST have duplicates?

It can if the implementation defines where equal values go or stores a count.