Differences

This shows you the differences between two versions of the page.

Link to this comparison view

courses:cs211:winter2011:journals:andrew:chapter2_continued [2011/01/26 02:51] – created bennettacourses:cs211:winter2011:journals:andrew:chapter2_continued [2011/01/26 03:02] (current) bennetta
Line 30: Line 30:
  *A priority queue is designed for applications in which elements are assigned priority values. Every time an element is selected from this queue it should return the element with the highest priority value\\  *A priority queue is designed for applications in which elements are assigned priority values. Every time an element is selected from this queue it should return the element with the highest priority value\\
  *PQ's can be very useful for rationing memory, time, etc to different processes on a computer. Processes may not come in at the same time but the ones with the highest priorities will always jump the line and be executed before those with lower priorities\\  *PQ's can be very useful for rationing memory, time, etc to different processes on a computer. Processes may not come in at the same time but the ones with the highest priorities will always jump the line and be executed before those with lower priorities\\
- *We aim for logn time when using priority queues.  + *We aim for logn time when using priority queues.\\ 
 + *Heaps are the best way to implement priority queues as they are the only data structure that allows us to perform all of the PQ operations in logn time 
 + *Heaps "combine the advantages of a sorted array and a list" 
 + *A heap can be thought of, conceptually, as a balanced binary tree 
 + 
 + 
 +===== Ending Thoughts ===== 
 +Yet again the book does a good job in this chapter of shoring up any leaks I may have had in my own mind about the information we have covered in class on this topic. While Prof. Sprenkle does a much better job of teaching the material and making it learn-able, the extra readings in the text book allow me to gain a better understanding of the subject matter. Readability: 7/10  
courses/cs211/winter2011/journals/andrew/chapter2_continued.1296010278.txt.gz · Last modified: 2011/01/26 02:51 by bennetta
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0