After teaching Priority Queues, I want to give the students some notion of what it looks like when they are used in code.
I have two approaches and I am unsure about which would serve my goal better:
- Show them a number of examples where a Priority Queue is used (task management, patient treatment etc.) and for each one discuss how the priority queue impacts the performance or efficiency.
- Let them be creative and try to think of a use for a priority queue, and let them implement that usage on their own (a lab period).
Obviously, each option has its merits. I am wondering which one would increase understanding more. The first option shows them uses and the reasoning behind that usage, which is great for understanding the subject. On the other hand, option 2 lets them experience it first hand, which is (almost) always good.
So I am torn between these two.