Sorting Quiz

Quiz
•
Other, Education, Science
•
University - Professional Development
•
Medium

B G
Used 18+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
How many passes does an insertion sort algorithm consist of?
n
n-1
n+1
Answer explanation
An insertion algorithm consists of N-1 passes when an array of N elements is given
2.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What is the average case running time of an insertion sort algorithm?
Answer explanation
The average case analysis of a tight bound algorithm is mathematically achieved to be O(N2).
3.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Insertion Sort is
stable and sorts in place
unstable and sorts in place
stable and does NOT sort in place
NOT stable and does NOT sort in place
Answer explanation
During insertion sort, the relative order of elements is not changed. Therefore, it is a stable sorting algorithm. And insertion sort requires only O(1) of additional memory space. Therefore, it sorts In-place.
4.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Which of the following sorting algorithm is best suited if the elements are already sorted?
Insertion Sort
Merge Sort
Heap Sort
Answer explanation
The best case running time of the insertion sort is O(n). The best case occurs when the input array is already sorted. As the elements are already sorted, only one comparison is made on each pass, so that the time required is O(n).
5.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Merge sort uses which of the following technique to implement sorting?
backtracking
greedy algorithm
divide and conquer
dynamic programming
6.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What is the average case time complexity of merge sort?
7.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What is the space complexity of merge sort?
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
DS Q-1-2024 Batch

Quiz
•
University
15 questions
Genetics Mutations

Quiz
•
7th Grade - University
15 questions
Mutations Review

Quiz
•
8th Grade - University
15 questions
Mutation Quiz

Quiz
•
9th Grade - University
15 questions
DSA & Code Snippets

Quiz
•
University
15 questions
AlgoWhiz Quiz

Quiz
•
University
16 questions
Christmas Quiz KS3

Quiz
•
6th Grade - University
15 questions
Gene Mutations

Quiz
•
8th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
10 questions
How to Email your Teacher

Quiz
•
Professional Development
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University