Skip to content
Abstract Data Structures and Algorithms · Semester 1

Heaps and Priority Queues

Students will learn to create and use simple functions to group related instructions, making programs more organized and easier to manage.

Key Questions

  1. Prove that the build-heap procedure runs in O(n) time rather than O(n log n) using an amortised argument over the levels of the heap.
  2. Trace the sift-up and sift-down operations on a max-heap during insertion and extract-max, and derive the O(log n) complexity of each operation.
  3. Design an application requiring a priority queue—such as a task scheduler or Dijkstra's algorithm—and justify why a binary heap is the appropriate underlying structure compared to a sorted list.

MOE Syllabus Outcomes

MOE: Programming - Middle School
Level: JC 2
Subject: Computing
Unit: Abstract Data Structures and Algorithms
Period: Semester 1

Ready to teach this topic?

Generate a complete, classroom-ready active learning mission in seconds.

Browse curriculum by country

AmericasUSCAMXCLCOBR
Asia & PacificINSGAU