
DS Quizz

Quiz
•
Education
•
University
•
Medium
Auzoom four
Used 1+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the time complexity of Binary Search in the worst case?
O(n)
O(log n)
O(n log n)
O(n^2)
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is a stable sorting algorithm?
Quick Sort
Merge Sort
Heap Sort
Selection Sort
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
In which case does Linear Search outperform Binary Search?
When the array is sorted
When the array has duplicate elements
When the array is small and unsorted
When the array is large and sorted
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is true about the time complexity of Selection Sort?
It is O(n) in the worst case.
It is O(n log n) in the best case.
It is O(n^2) in both the worst and best cases.
It is O(log n) in the worst case.
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Consider the following pseudocode:
for i = 1 to n:
for j = 1 to i:
print(i, j)
O(n)
O(n log n)
O(n^2)
O(n^3)
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Consider the following pseudocode:
for i = 0 to n-1:
minIndex = i
for j = i+1 to n:
if arr[j] < arr[minIndex]:
minIndex = j
swap arr[i] with arr[minIndex]
What is the time complexity of this algorithm?
A) O(n)
B) O(n log n)
C) O(n^2)
D) O(n^3)
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Consider the following pseudocode:
for i = 1 to n:
for j = 1 to n:
for k = 1 to n:
print(i, j, k)
What is the time complexity of this algorithm?
O(n)
O(n^2)
O(n^3)
O(n log n)
Create a free account and access millions of resources
Similar Resources on Wayground
11 questions
EDB

Quiz
•
University
9 questions
Quizz de EPT- Resolução CNE/CP nº 1, de 5 de janeiro de 2021

Quiz
•
University
12 questions
Ortografía

Quiz
•
University
16 questions
Alimentazione

Quiz
•
12th Grade - Professi...
15 questions
Final Quiz TT HCM

Quiz
•
University
10 questions
LICITAÇÃO

Quiz
•
University
13 questions
Carbohidratos

Quiz
•
University
15 questions
Quiz Pâncreas

Quiz
•
University
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
Discover more resources for Education
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

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

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

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

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University