Quiz: Comparison Sort Theory

Test your understanding

Check Your Understanding

Why can't any comparison-based sort beat O(nlogn)O(n \log n) in the worst case?

  1. A.Because there are n!n! possible orderings and each comparison only eliminates half
  2. B.Because the decision tree must have at least n!n! leaves, requiring height log(n!)\geq \log(n!)
  3. C.Because computers can only compare two elements at a time
  4. D.Because merge sort is already optimal and it takes O(nlogn)O(n \log n)
Start the roadmap to answer the quizzes and solve the challenges