Projects? Review language & properties of trees Ch15.1 Priority Queues idea/abstraction Push items into a container... The Big lumps float to the top quote from standard<queue> http://www.csci.csusb.edu/dick/cs330/Ref/priority_queues sample demo code http://www.csci.csusb.edu/dick/cs330/SourceCode/demoPriorityQueue.cpp Questions? How the data sifts up the tree. http://www.csci.csusb.edu/dick/cs330/Slides/makeheap.gif http://www.csci.csusb.edu/dick/cs330/Slides/sortheap.gif Did you spot the mistake in the above two Images? Ch15.2 Heaps A way to store a complete tree in a vector, array, or deque. demo/hands on draw tree, number nodes by levels 0.., plot into a vector quote from standard<algorithm> and sample test code http://www.csci.csusb.edu/dick/cs330/Ref/libraries.txt and search (in page) for heap. STL vs book template STL does NOT define a heap<T> data type! Instead a couple of algorithms manipulate vectors p364 http://www.csci.csusb.edu/dick/cs330/SourceCode/theap.cpp 15.2.1 -> adjust_heap algorithm http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/heaps.html ( Animation button at bottom.) demo/handson? bottom 368..top 369: use STL in project timing on p371 Also see http://www.hig.no/~algmet/animate.html#chap11 skip 15.3 Skew heaps - NO! next 15.4 Prepare by studying the code for the icecream store. Bring in your questions. Be ready to use what you learned while studying this code.