
Big O Quiz: Test Your Understanding
Quiz
•
Other
•
12th Grade
•
Hard
mins mins
Used 3+ times
FREE Resource
Enhance your content
33 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of inserting a new element at the beginning of a linked list?
a) O(1)
b) O(log n)
c) O(n)
d) O(n log n)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
15. Consider the following Java code snippet:
for (int i = 0; i < n; i++) { // Do something in constant time
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < i; j++) { // Do something in constant time
}
}
What is the time complexity of this code?
a) O(n)
b) O(n^2)
c) O(n log n)
d) O(n^3)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of finding the median of an unsorted array?
a) O(1)
b) O(n)
c) O(n log n)
d) O(n^2)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of finding the mode of a sorted array?
a) O(1)
b) O(n)
c) O(n log n)
d) O(n^2)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of sorting an array using quick sort in the worst case?
a) O(n)
b) O(n log n)
c) O(n^2)
d) O(n^3)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of sorting an array using heap sort?
a) O(n)
b) O(n log n)
c) O(n^2)
d) O(n^3)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of the remove(index) operation in an ArrayList?
A. O(n)
B. O(1)
C. O(log n)
D. O(n^2)
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
36 questions
TIPOLOGÍAS TEXTUALES
Quiz
•
9th - 12th Grade
30 questions
Pronoms Febles (CD, CI)
Quiz
•
10th - 12th Grade
28 questions
Pasapalabra de la Lengua Castellana IV
Quiz
•
8th - 12th Grade
37 questions
2. Kimia_XI.MIPA
Quiz
•
12th Grade
30 questions
CTSQUISTICA
Quiz
•
12th Grade
35 questions
Take Flight Jet Book 1
Quiz
•
6th Grade - University
30 questions
Banks SOal Larutan Penyangga
Quiz
•
12th Grade
35 questions
qgwegeth
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Other
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
29 questions
CCG 2.2.3 Area
Quiz
•
9th - 12th Grade
15 questions
PRESENTE CONTINUO
Quiz
•
9th - 12th Grade
13 questions
BizInnovator Startup - Experience and Overview
Quiz
•
9th - 12th Grade
16 questions
AP Biology: Unit 1 Review (CED)
Quiz
•
9th - 12th Grade