Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| courses:cs211:winter2012:journals:jeanpaul:chaptter2section5 [2012/01/24 22:58] – [Implementing the Priority queue] mugabej | courses:cs211:winter2012:journals:jeanpaul:chaptter2section5 [2012/01/26 17:59] (current) – [Implementing the Priority queue] mugabej | ||
|---|---|---|---|
| Line 31: | Line 31: | ||
| * For a heap H,H[1] = root | * For a heap H,H[1] = root | ||
| * leftChild(i) = 2i | * leftChild(i) = 2i | ||
| - | * rightChiled(i) = 2i + 1 | + | * rightChild(i) = 2i + 1 |
| * parent(i) = int(i/ | * parent(i) = int(i/ | ||
| * length(H) = number of elements in the heap(Logical size) | * length(H) = number of elements in the heap(Logical size) | ||
