Track arrival order when priorities tie

A print queue contains jobs in arrival order [4A, 2A, 4B, 2B, 1C]. Each number is a priority; each letter identifies a job within that priority. A stable sort preserves arrival order among jobs with equal priorities.


The queue uses ascending selection sort. Each pass starts with the first remaining job as its minimum candidate, replaces that candidate only for a strictly smaller priority, and finally swaps the selected job with the first remaining job. Comparisons ignore the letters. Which statements are true? Select all that apply.

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Selection Sort Questions: