algoritmauzmanı
Sign in
TREN
Subtopic 6.5

Binary Search Tree with Linked Nodes

6lessons35 min0done

A is usually coded with linked nodes: the tree grows only as much as needed and has no empty cells. Search, insertion and the minimum and maximum come in the same order as the array lessons.

Deletion splits into three cases and is an exam favourite: a leaf, a node with one child and a node with two children. The last lesson covers the worst case, where the tree grows unbalanced, and why are needed.

Lesson 6.5.1 Search: left or right?5 min