
Sorting Algorithms Quiz

Quiz
•
Computers
•
12th Grade
•
Hard
DR MURTHY
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the worst-case time complexity of Selection Sort?
O(n)
O(n log n)
O(n^2)
O(log n)
Answer explanation
Selection Sort has a worst-case time complexity of O(n^2) due to its nested loops for finding the minimum element and swapping it with the current element.
2.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which of the following is true for Selection Sort?
It is the most efficient sorting algorithm.
It improves time complexity by making only one exchange for every pass through the list.
It is more complex than Quick Sort.
It is significantly faster than Bubble Sort in practical scenarios.
Answer explanation
The correct choices are that Selection Sort improves time complexity by making only one exchange for every pass through the list and it is significantly faster than Bubble Sort in practical scenarios.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which sorting algorithm builds the final sorted array one item at a time?
Bubble Sort
Selection Sort
Insertion Sort
Merge Sort
Answer explanation
Insertion Sort builds the final sorted array one item at a time by taking each element and inserting it into its correct position in the sorted array.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the best case time complexity of Bubble Sort?
O(n log n)
O(n^2)
O(n)
O(log n)
Answer explanation
Bubble Sort has a best case time complexity of O(n) when the array is already sorted, as it only requires one pass to check if any swaps are needed.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In which sorting technique is the entire list divided into two parts: the sorted part at the left end and the unsorted part at the right end?
Bubble Sort
Insertion Sort
Selection Sort
Quick Sort
Answer explanation
In Insertion Sort, the list is divided into two parts: the sorted part on the left and the unsorted part on the right, making it the correct choice for the given scenario.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which sorting algorithm repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order?
Selection Sort
Merge Sort
Bubble Sort
Insertion Sort
Answer explanation
Bubble Sort repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order, making it the correct choice for the given question.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does Bubble Sort behave if the list is already sorted?
It does not perform any operations.
It performs a single pass through the list to confirm it is sorted.
It behaves the same way as if the list were unsorted.
It immediately recognizes the list is sorted and stops.
Answer explanation
The Bubble Sort algorithm will perform a single pass through the list to confirm it is already sorted, making it the correct choice.
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Algorithm Quiz

Quiz
•
12th Grade
15 questions
File Types - Information Processing Part 3

Quiz
•
5th - 12th Grade
15 questions
Array Search & Sort Quiz

Quiz
•
12th Grade
10 questions
Linear Data

Quiz
•
12th Grade
10 questions
PENILAIAN HARIAN 2

Quiz
•
11th Grade - University
10 questions
PDA Software I&T - Constructs Required

Quiz
•
12th Grade
15 questions
CS Algorithms Quiz

Quiz
•
12th Grade
10 questions
Programming Paradigms

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade