









































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Lecture notes for cs2110 fall 2008, covering priority queues and heaps, including implementation, examples, and complexity analysis. It also includes an introduction to heaps as a data structure for implementing priority queues, and a comparison of their complexity to ordered and unordered list implementations.
Typology: Study notes
1 / 49
This page cannot be seen from the preview
Don't miss anything!










































Lecture 17 CS2110 Fall 2008
boolean add(E e) {...} //insert an element (insert) void clear() {...} //remove all elements E peek() {...} //return min element without removing //(null if empty) E poll() {...} //remove min element (extract) //(null if empty) int size() {...}
0 1 2 (^3 4 5 ) 7 8 9 10 11 children of node n are found at 2n + 1 and 2n + 2