Algorithm Selection Sort Quiz Quiestions

5 Questions | Total Attempts: 1709

SettingsSettingsSettings
Please wait...
Algorithm Quizzes & Trivia

In sorting bulk data in computer databases, we have different ways to help sort it out including shell sort and algorithm selection sort. In this quiz, we focus our attention to the former type of sorting data.


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

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

    • B. 

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

    • C. 

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

    • D. 

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

  • 2. 
    In a selection sort structure, there is/are?
    • A. 

      Two separate for loops

    • B. 

      Three for loops, all separate

    • C. 

      Two for loops, one nested in the other

    • D. 

      A for loop nested inside a while loop

  • 3. 
    Which one of the following is the first step in a selection sort algorithm?
    • A. 

      The minimum value in the list is found

    • B. 

      The maximum value in the list is found

    • C. 

      Adjacent elements are swapped

  • 4. 
    How many passes/scans will go through a list of 10 elements?
    • A. 

      11

    • B. 

      9

    • C. 

      20

    • D. 

      25

  • 5. 
    How many passes (or "scans") will there be through a list being sorted using a selection sort?
    • A. 

      Array_size*2

    • B. 

      Array_size+1

    • C. 

      Array_size-1

    • D. 

      None of the above