Close
Register
Close Window

Show Source |    | About   «  7.16. Array Implementation for Complete Binary Trees   ::   Contents   ::   17.18. Huffman Coding  »

17.17. Heaps

17.17.1. Heaps

17.17.1.1. Complete Trees

Complete binary tree node numbering
\[\begin{split}\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline \textrm{Position} & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11\\ \hline \hline \textrm{Parent} & \,--\, & 0 & 0 & 1 & 1 & 2 & 2 & 3 & 3 & 4 & 4 & 5\\ \hline \textrm{Left Child} & 1 & 3 & 5 & 7 & 9 & 11 & \,--\, & \,--\, & \,--\, & \,--\, & \,--\, & \,--\,\\ \hline \textrm{Right Child} & 2 & 4 & 6 & 8 & 10 & \,--\, & \,--\, & \,--\, & \,--\, & \,--\, & \,--\, & \,--\,\\ \hline \textrm{Left Sibling} & \,--\, & \,--\, & 1 & \,--\, & 3 & \,--\, & 5 & \,--\, & 7 & \,--\, & 9 & \,--\,\\ \hline \textrm{Right Sibling} & \,--\, & 2 & \,--\, & 4 & \,--\, & 6 & \,--\, & 8 & \,--\, & 10 & \,--\, & \,--\,\\ \hline \end{array}\end{split}\]

17.17.1.2. Heap insert

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

17.17.1.3. Building a Heap

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

17.17.1.4. Building a Heap Proof

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

17.17.1.5. Delete the maximum value

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

   «  7.16. Array Implementation for Complete Binary Trees   ::   Contents   ::   17.18. Huffman Coding  »

nsf
Close Window