🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Sorting, heapq and bisect: all 10 questions

Quiz: Sorting, heapq and bisect · Question 2 of 10

What does it mean that Python's sort is stable?

What does it mean that Python's sort is stable?

  1. A.It never raises an error
  2. B.It always takes O(n) time
  3. C.Items with equal keys keep the order they had before sorting
  4. D.It sorts the list in place
Answer & explanation

Correct answer: Items with equal keys keep the order they had before sorting

Stability is what makes sorting in several passes work.

Can you get the rest right without peeking?

Take the timed Quiz: Sorting, heapq and bisect quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →