Chapter quiz · Sorting

Test what you learned.

8 questions on Sorting. Pass 70% to clear the chapter.

← Review chapter lessons

Quiz

Sorting — Chapter Quiz

Eight questions on stability, in-place sorts, comparison vs non-comparison sorts, the Ω(n log n) lower bound, and JS TimSort.

0/ 9
  1. Question 1
    1

    What does it mean for a sorting algorithm to be 'stable'?

  2. Question 2
    2

    What is a gotcha with JavaScript's built-in Array.prototype.sort() when sorting numbers?

  3. Question 3
    3

    What sorting algorithm does V8 use for Array.prototype.sort()?

  4. Question 4
    4

    What is the theoretical lower bound for comparison-based sorting algorithms?

  5. Question 5
    5

    Which of the following sorting algorithms is NOT comparison-based and can beat the Ω(n log n) bound?

  6. Question 6
    6

    Quick sort is always faster than merge sort in practice.

  7. Question 7
    7

    Heap sort is an in-place, O(n log n) sort that uses a data structure called a ___.

  8. Question 8
    8

    Which sorting algorithms are stable? (Select all that apply)

    Select all that apply.

Pick an answer — instant feedback as you go.