Sorting Algorithm Quiz - Quick Sort

5 Questions | Total Attempts: 2512

SettingsSettingsSettings
Algorithm Quizzes & Trivia

Quicksort is an in-place sorting algorithm. Developed by British computer scientist Tony Hoare in 1959 and published in 1961, it is still a commonly used algorithm for sorting. When implemented well, it can be somewhat faster than merge sort and about two or three times faster than heapsort


Questions and Answers
  • 1. 
    What are the correct intermediate steps of the following data set when it is being sorted with the Quick sort? 15,20,10,18
    • A. 

      15,10,20,18 -- 15,10,18,20 -- 10,15,18,20

    • B. 

      15,20,10,18 -- 15,10,20,18 -- 10,15,20,18

    • C. 

      10, 20,15,18 -- 10,15,20,18 -- 10,15,18,20

    • D. 

      10, 20,15,18 -- 10,18,15,20 -- 10,15,18,20

  • 2. 
    Quick sort uses
    • A. 

      Exchanging

    • B. 

      Partitioning

    • C. 

      Selection

    • D. 

      Merging

  • 3. 
    Using quick sort is a stable way of sorting
    • A. 

      True

    • B. 

      False

  • 4. 
    "Divide-and-conquer" refers to:
    • A. 

      The list being divided into sublists with equal numbers of elements in each, then those sorted sublists are merged back together.

    • B. 

      The list being divided into only two sublists, never more or less, which are sorted and merged back together.

    • C. 

      The list being divided into smaller sublists, then those sorted sublists are merged back together.

  • 5. 
    In this sequence, 11 4 20 45 32 60 98 70, which element seems to be the pivot?
    • A. 

      70

    • B. 

      20

    • C. 

      98

    • D. 

      4

Back to Top Back to top
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.