Subtopic 6.5
Binary Search Tree with Linked Nodes
6lessons35 min0done
A binary search tree 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 balanced trees are needed.