|
|
Viewing Message
|
|
|
| ``See balanced binary tree''
by rmilson on 2002-03-24 23:37:11 |
|
| 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 |
| | [ reply | up ] |
|
|
|
|
|
|