Skip to content

Heap

A binary tree where every child is either smaller, or larger than the current node.

Types of trees

Using an array to represent a tree

n is any index in the array.

Use cases