15-122 Principles of Imperative Computation
Lecture 15: Priority Queues

  • Reading: 15-priorqs.pdf
  • Code: priorqs.c0, code directory
  • Concepts:
    • Interface to priority queues
    • Bounded and unbounded priority queues
    • Heaps
    • Shape invariant
    • Ordering invariant
    • Insert: sifting up
    • Delete: sifting down
    • Restoring data structure invariants
    • O(log(n)) insert and delete
  • Previous lecture: Interfaces
  • Next lecture: Restoring Invariants

[ Home | Schedule | Assignments | Resources ]
[ Piazza | Blackboard ]

fp@cs
Frank Pfenning