Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
courses:cs211:winter2011:journals:david:chapter2 [2011/01/25 20:26] – [2.4 - A Survey of Common Running Times] margoliesd | courses:cs211:winter2011:journals:david:chapter2 [2011/01/25 20:53] (current) – [2.5 - A More Complex Data Structure: Priority Queues] margoliesd | ||
---|---|---|---|
Line 18: | Line 18: | ||
I give this section a readability of 5/10. | I give this section a readability of 5/10. | ||
+ | |||
+ | ====2.5 - A More Complex Data Structure: Priority Queues==== | ||
+ | |||
+ | An efficient algorithm can be improved by using a different kind of data structure. In a priority queue, all elements have an associated key or value, and the lower the value, the higher the priority. Operating systems use priority queues to determine which process gets to use the CPU. In a priority queue, an element can be added, deleted, and the highest priority item can be selected in O(logN) time. Priority queues can be implemented using a heap, which is visually like a " | ||
+ | |||
+ | I give this section a readability of 7/10. |