# heapsort

## Primary tabs

Type of Math Object:
Algorithm
Major Section:
Reference

## Mathematics Subject Classification

### See balanced binary tree

Initially this entry confused me. I kept
wondering, "Where are the parent/child links?"

I didn't quite grok this till I remembered that a
heap is a balanced binary tree, and as such can
be represented by an array. So entry 0 is the
parent of entries 1,2 which in turn are the parents
of entries 3,4 and 5,6 respectively, etc.

The problem, I guess, is that "balanced binary tree"
is two clicks away from "heapsort", and I missed
this vital bit of information on the first pass
over the material