
Algorithm Complexity
Presentation
•
Computers
•
University
•
Medium
Shahbaz Farooq
Used 8+ times
FREE Resource
21 Slides • 21 Questions
1
Algorithm Complexity
By Shahbaz Farooq
Big O Notation
2
Multiple Choice
3
Multiple Select
4
Multiple Choice
5
Multiple Choice
6
What do you think ?
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Multiple Choice
If for an algorithm time complexity is given by O(1) then complexityof it is:
constant
polynomial
exponential
none of the mentioned
21
Multiple Choice
O(n)
O(m)
O(n+m)
O(n*m)
22
Multiple Choice
If for an algorithm time complexity is given by O(n) then complexityof it is:
A. constant
B. linear
C. exponential
D. none of the mentioned
23
Multiple Choice
What is the time complexity of this algorithm?
O(n)
O(2n)
O(log n)
O(n2)
O(1)
24
Multiple Choice
What is the time complexity of this algorithm?
O(n)
O(2n)
O(log n)
O(n2)
O(1)
25
Multiple Choice
Why is this not a sequence?
Start car
Put in key
Turn key
Drive away
There are spelling mistakes
The instructions are in the correct order
The instructions are in the wrong order
It is a sequence
26
27
28
29
Multiple Choice
Time Complexity of this program:
def f():
a = 0
for i = 1 to n:
a += i;
b = 0
for i = 1 to m:
b += i;
O(n)
O(m)
O(n+m)
O(n*m)
30
Multiple Choice
If for an algorithm time complexity is given by O(1) then complexityof it is:
constant
polynomial
exponential
none of the mentioned
31
Multiple Choice
If for an algorithm time complexity is given by O(n) then complexityof it is:
A. constant
B. linear
C. exponential
D. none of the mentioned
32
Multiple Choice
Indicate constant time complexity in terms of Big-O notation
O(n)
O(1)
O(log n)
O (n^2)
33
Multiple Choice
Indicate exponential time complexity in terms of big-O notation
O (n)
O (n^2)
O (2^n)
O (log n)
34
Multiple Choice
Find the slowest time complexity
O (n)
O (n^2)
O (n!)
O (2^n)
35
Multiple Choice
Which notation is consistent for every execution?
O (n)
O (n^2)
O (1)
O (2^n)
36
Multiple Choice
The O (n!) is so inefficient, there is no practical use for it
True
False
37
Fill in the Blanks
Type answer...
38
Multiple Choice
O (n log n) is the worst case scenario for
Merge Sort
Bubble Sort
Binary Search
Linear Search
39
Multiple Choice
O n2 is the worst case scenario for
Merge Sort
Bubble Sort
Binary Search
Linear Search
40
41
42
Algorithm Complexity
By Shahbaz Farooq
Big O Notation
Show answer
Auto Play
Slide 1 / 42
SLIDE
Similar Resources on Wayground
36 questions
Levels of Organization - Cells to Biome
Presentation
•
KG
39 questions
Módulo 3: Visão geral da infraestrutura global da AWS
Presentation
•
University
34 questions
IntroDatabases
Presentation
•
University
36 questions
BBB3103/BBB3033 EOP Unit 1
Presentation
•
University
41 questions
ClaseString
Presentation
•
University
38 questions
W7 - IP Addressing (SY24-25/C305-302I)
Presentation
•
University
38 questions
El método de selección
Presentation
•
University
40 questions
UA Semana 1 Semana Zero
Presentation
•
University
Popular Resources on Wayground
5 questions
A Home on the Shore
Quiz
•
3rd Grade
28 questions
US History Regents Review
Quiz
•
11th Grade
6 questions
A Horse Tale
Quiz
•
3rd Grade
20 questions
Math Review
Quiz
•
3rd Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
20 questions
Dividing Fractions
Quiz
•
5th Grade
55 questions
A Long Walk to Water Final Review
Quiz
•
6th - 8th Grade
10 questions
Equation Word Problems
Quiz
•
7th Grade