Bubble sort can stop early when:
- the first item is the smallest
- it has done n passes
- a complete pass makes no swaps
- 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