
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
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade