Algorithm Selection Sort Quiz Quiestions

Reviewed by Godwin Iheuwa
Godwin Iheuwa, MS (Computer Science) |
Database Administrator
Review Board Member
Godwin Iheuwa, a Database Administrator at MTN Nigeria, holds an MS in Computer Science, specializing in Agile Methodologies and Database Administration from the University of Bedfordshire and a Bachelor's in Computer Science from the University of Port Harcourt. His proficiency in SQL Server Integration Services (SSIS) and SQL Server Management Studio contributes to his expertise in database management.
, MS (Computer Science)
By RosyU
R
RosyU
Community Contributor
Quizzes Created: 6 | Total Attempts: 43,117
| Attempts: 10,099 | Questions: 5
Please wait...
Question 1 / 5
0 %
0/100
Score 0/100
1. Which one of the following is the first step in a selection sort algorithm?

Explanation

In a selection sort algorithm, the first step is to find the minimum value in the list. This is done by comparing each element with the current minimum value and updating the minimum if a smaller value is found. Once the minimum value is found, it is swapped with the first element in the list. This process is then repeated for the remaining elements in the list, finding the minimum value in each iteration and swapping it with the corresponding element. This continues until the list is fully sorted.

Submit
Please wait...
About This Quiz
Algorithm Selection Sort Quiz Quiestions - Quiz

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... see moreour attention to the former type of sorting data.
see less

2. What are the correct intermediate steps of the following data set when it is being sorted with the Selection sort?
15,20,10,18

Explanation

The given data set is being sorted using the Selection sort algorithm. In each step of the algorithm, the smallest element from the unsorted portion of the list is selected and swapped with the element at the beginning of the unsorted portion.

In the first step, the smallest element, 10, is selected and swapped with the first element, resulting in the list: 10, 20, 15, 18.

In the second step, the smallest element from the remaining unsorted portion, 15, is selected and swapped with the second element, resulting in the list: 10, 15, 20, 18.

In the third and final step, the smallest element from the remaining unsorted portion, 18, is selected and swapped with the third element, resulting in the final sorted list: 10, 15, 18, 20.

Submit
3. How many passes/scans will go through a list of 10 elements?

Explanation

Since there are 10 elements in the list, each pass/scan will go through one element. Therefore, there will be a total of 10 passes/scans. However, the question is asking for the number of passes/scans, not the number of elements. Therefore, the correct answer is 9, as the first pass/scan is not counted.

Submit
4. In a selection sort structure, there is/are?

Explanation

In a selection sort structure, there are two for loops, one nested in the other. This structure is used to sort a list of elements by repeatedly finding the minimum element from the unsorted part and placing it at the beginning. The outer loop iterates through each element of the list, while the inner loop compares the current element with the remaining elements to find the minimum. By nesting the inner loop within the outer loop, the algorithm can compare each element with all the remaining elements, ensuring that the minimum element is correctly placed.

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

Explanation

In a selection sort, each pass involves finding the minimum element from the unsorted part of the list and swapping it with the first element of the unsorted part. After each pass, the sorted part of the list increases by one element. Since there are a total of array_size elements in the list, it will take array_size-1 passes to sort the entire list.

Submit
View My Results
Godwin Iheuwa |MS (Computer Science) |
Database Administrator
Godwin Iheuwa, a Database Administrator at MTN Nigeria, holds an MS in Computer Science, specializing in Agile Methodologies and Database Administration from the University of Bedfordshire and a Bachelor's in Computer Science from the University of Port Harcourt. His proficiency in SQL Server Integration Services (SSIS) and SQL Server Management Studio contributes to his expertise in database management.

Quiz Review Timeline (Updated): Jun 16, 2025 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jun 16, 2025
    Quiz Edited by
    ProProfs Editorial Team

    Expert Reviewed by
    Godwin Iheuwa
  • Dec 25, 2011
    Quiz Created by
    RosyU
Cancel
  • All
    All (5)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which one of the following is the first step in a selection sort...
What are the correct intermediate steps of the following data set when...
How many passes/scans will go through a list of 10 elements?
In a selection sort structure, there is/are?
How many passes (or "scans") will there be through a list...
Alert!

Advertisement