<p>I would recommend that you let them figure it out themselves, then explain how to improve upon it. That way some students are certain to have the wrong implementation or a non-optimal one, and that gives you a way to begin talking about <em>why</em> student X's algorithm is wrong, and from there you can move into the theory.</p>

<p>Also, this allows students to learn from their mistakes and learn from each others mistakes, which is almost always beneficial.</p>

<p>You could also give them a completed application with only the priority queue implementation removed and ask them to replace it.</p>

CC BY-SA 3.0
2017-06-24T15:53:57.340Z
2017-06-24T15:56:12.367Z
2017-06-24T15:56:12.367Z
thesecretmaster
<blockquote>
  <p><strong>Let them be creative</strong> and try to think of a use for a priority queue, and let them implement that usage <strong>on their own.</strong></p>
</blockquote>

<p>If you want something to stick, heed your own advice in bold: "Let them be creative ... on their own."</p>

<p>When students can use their own creative powers to synthesize everything they've been taught, then they've truly learned it. "Show and discuss" is not necessarily a bad approach, but it won't have nearly the same long-lasting effect as putting the onus on students. If you're the one working, you're the one learning, so if you're the own showing, you're really the one doing most of the work.</p>

<p>Plus, why not do both? Start with option #2 then analyze their own work with option #1. As with most things, it's not either/or. Imagine if the efficiency conversation were about their own implementations, not some you had shown them. That would be a powerful set of lessons.</p>

<p>One heuristic I apply to my own lesson planning is this: is this lesson giving students the option to take ownership of the material? When you challenge them to create, you are giving them that opportunity to -- and challenging them to -- take ownership of their learning.</p>

CC BY-SA 3.0
2017-06-24T17:00:02.250Z
2017-06-24T17:00:02.250Z
Peter
<p>After teaching Priority Queues, I want to give the students some notion of what it looks like when they are used in code.</p>

<p>I have two approaches and I am unsure about which would serve my goal better:</p>

<ol>
<li>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.</li>
<li>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).</li>
</ol>

<p>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.</p>

<p>So I am torn between these two. </p>

<lesson-ideas><best-practice><priority-queue>
Priority Queue practice vs examples
# Priority Queue practice vs examples

(Asked by: username_0 on 2017-06-24)

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:

1. 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.
2. 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.

**Tags:** lesson-ideas, best-practice, priority-queue


---

## 2 answers

### Answer by username_2 on 2017-06-24. Score: 2 | Accepted answer

> **Let them be creative** and try to think of a use for a priority queue, and let them implement that usage **on their own.**

If you want something to stick, heed your own advice in bold: "Let them be creative ... on their own."

When students can use their own creative powers to synthesize everything they've been taught, then they've truly learned it. "Show and discuss" is not necessarily a bad approach, but it won't have nearly the same long-lasting effect as putting the onus on students. If you're the one working, you're the one learning, so if you're the own showing, you're really the one doing most of the work.

Plus, why not do both? Start with option #2 then analyze their own work with option #1. As with most things, it's not either/or. Imagine if the efficiency conversation were about their own implementations, not some you had shown them. That would be a powerful set of lessons.

One heuristic I apply to my own lesson planning is this: is this lesson giving students the option to take ownership of the material? When you challenge them to create, you are giving them that opportunity to -- and challenging them to -- take ownership of their learning.


---

### Answer by username_1 on 2017-06-24. Score: 1

I would recommend that you let them figure it out themselves, then explain how to improve upon it. That way some students are certain to have the wrong implementation or a non-optimal one, and that gives you a way to begin talking about *why* student X's algorithm is wrong, and from there you can move into the theory.

Also, this allows students to learn from their mistakes and learn from each others mistakes, which is almost always beneficial.

You could also give them a completed application with only the priority queue implementation removed and ask them to replace it.


---

