
Analysis of Algorithm 2-Quizz(0)
Authored by Bilal Syed
Computers
University - Professional Development
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
The complexity of Binary search algorithm is
O(n)
O(log n)
O(n2)
O(n log n)
2.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What is the time complexity of following code:
int a = 0;
for (i = 0; i < N; i++) {
for (j = N; j > i; j--) {
a = a + i + j;
}
}
O(N)
O(N*log(N))
O(N * Sqrt(N))
O(N*N)
3.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
A linear function takes the form
f(n) = an + b
f(n) = an2 +bn + c
f(n) = alog2n
f(n) = a + b
4.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
The number of executions grows extremely quickly as the size of the input increases
Exponential Time
Linear Time
Polynomial Time
Constant Time
5.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What does it mean when we say that an algorithm X is asymptotically more efficient than Y?
X will be a better choice for all inputs
X will be a better choice for all inputs except possibly small inputs
X will be a better choice for all inputs except possibly large inputs
Y will be a better choice for small inputs
6.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Consider this list of numbers: 3 4 6 7 8 9. If the number 9 was to be found using a linear search, how many comparisons need to be made?
7.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What is the main disadvantage of a binary search compared to a linear search?
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
20 questions
data structures1
Quiz
•
University
20 questions
UF0511 Hojas de cálculo.
Quiz
•
Professional Development
20 questions
Pré Simulado - SC900
Quiz
•
Professional Development
20 questions
EVALUACIÒN PARCIAL - INNOVACIÒN TECNOLOGICA Y IA
Quiz
•
University
20 questions
Microsoft Excel
Quiz
•
KG - Professional Dev...
20 questions
Web Development and Programming
Quiz
•
University
20 questions
SEGURETAT DIGITAL ÀREA 1 CDD (B1)
Quiz
•
Professional Development
24 questions
Amazon Almeirim
Quiz
•
Professional Development
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade