Bubble sort can stop early when:

  1. the first item is the smallest
  2. it has done n passes
  3. a complete pass makes no swaps
  4. the list has an even length
Answer

C) a complete pass makes no swaps

No swaps in a pass means every adjacent pair is in order. SLO CS-11-B-02

Computer Science MCQ · More Unit 2: Computational Thinking and Algorithms MCQs · Practise