Lab 05
Here is a pdf version of the ppt I covered during the lab. And the codes that I (skimmed through) / (demonstrated live).
content.pdf (The pdf version of the ppt shown)
priority_queue_stl.cpp (Example usage of STL Priority Queue)
tree.cpp (Methods for creating and traversing a binary tree)
Challenge Questions -
Q) How can you use priority_queue to sort an array of integers.
Solution
TBAQ) When you are implementing the binary tree, try to create a method bool isDescendent(x, y) which returns true, if x is in the subtree of y, otherwise false.