For the questions that don’t fit in a textbook. Find their starting point
Fahahu

Ages 16–18 · A Level · Foundation

Resolve tied queue priorities

Use the primary priority key and the declared arrival tie-break together.

Understand the idea

A priority rule may leave equal-key items tied. A specified secondary key determines which tied record is selected; do not assume a tie-break the contract never gave.

Your challenge

A min-priority queue removes the lowest numeric priority. Ties are resolved by EARLIEST arrival time. A has priority 2 and arrived at time 3; B has priority 1 and arrived at time 2; C has priority 1 and arrived at time 1. Which item is removed first?

  • A
  • B
  • C

How to explore

  • Find the smallest numeric priority in the supplied records.
  • Restrict attention to every record at that priority.
  • Apply the declared earliest-arrival rule only within that tied set.

Open the activity to work with its controls and check your reasoning. Progress stays in this browser.

Keep exploring

DON’T LET THE QUESTION END HERE

Give that curiosity
somewhere to go.

Open the learning space

Discovery

Digital models simplify the real world. Explore with a grown-up and talk about what you notice.

Find something worth exploring

Explore free activities and printables, or learn about the separately paid Academy courses.