
Algorithm Analysis and Design
Quiz
•
Engineering
•
University
•
Practice Problem
•
Hard
EMMANUEL 210055
Used 1+ times
FREE Resource
Enhance your content in a minute
24 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 2 pts
If an algorithm has a loop that runs n times and performs O(1) operations in each iteration, what is the overall time complexity?
O(1)
O(n)
O(n²)
O(log n)
2.
MULTIPLE CHOICE QUESTION
20 sec • 2 pts
Consider the following code snippet:
for(int i = 0; i < n; i++) {
for(int j = 0; j < n; j++) {
cout << "Hello";
}
}
What is the time complexity?
O(n)
O(n log n)
O(n²)
O(n³)
3.
MULTIPLE CHOICE QUESTION
20 sec • 2 pts
What is the time complexity of the following algorithm?
int i = 1;
while (i < n) {
i = i * 2;
}
O(n)
O(log n)
O(n log n)
O(n²)
4.
MULTIPLE CHOICE QUESTION
20 sec • 2 pts
What is the time complexity of the recursive function below?
void func(int n) {
if (n <= 1) return;
func(n/2);
}
O(n)
O(log n)
O(n log n)
O(n²)
5.
MULTIPLE CHOICE QUESTION
20 sec • 2 pts
If a problem of size n is divided into two subproblems of size n/2 and combined in O(n) time, what is the overall time complexity using the Master Theorem?
O(n log n)
O(n²)
O(n)
O(log n)
6.
MULTIPLE CHOICE QUESTION
20 sec • 2 pts
What is the time complexity of inserting an element into a Binary Search Tree (BST) in the worst case?
O(1)
O(log n)
O(n)
O(n log n)
7.
MULTIPLE CHOICE QUESTION
20 sec • 2 pts
After inserting a new node in an AVL tree, which of the following operations might be required to maintain balance?
Only Left Rotation
Only Right Rotation
Either Left or Right Rotation
Left Rotation, Right Rotation, or Double Rotation
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
20 questions
Untitled Quiz
Quiz
•
1st Grade - University
20 questions
Examen de Desarrollo de Proyectos
Quiz
•
University
20 questions
GREEN TECHNOLOGY COMPLIANCE
Quiz
•
University
20 questions
Environmental Studies Quiz
Quiz
•
University
20 questions
Soal Pre Test CNC Lanjut (Turning)
Quiz
•
University
20 questions
Machine Learning
Quiz
•
University
20 questions
Artificial Intelligence CT-4
Quiz
•
University
20 questions
Cuestionario sobre AutoCAD 3D
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Engineering
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
9 questions
Principles of the United States Constitution
Interactive video
•
University
18 questions
Realidades 2 2A reflexivos
Quiz
•
7th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
25 questions
Integer Operations
Quiz
•
KG - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University
20 questions
SER vs ESTAR
Quiz
•
7th Grade - University
