Ace
Learns
Theme
light_mode
dark_mode
light_mode
Light
dark_mode
Dark
monitor
Auto
Open main menu
menu_open
×
Home
History
Geography
Astronomy
Physics
Chemistry
Biology
Agriculture
Sports
Computer Science
Articles
Contact Us
MCQ Categories
Articles
Home
Contact Us
Home
»
Computer Science
»
Analysis and Design of Algorithms
»
Time Complexity of Algorithms
Analysis and Design of Algorithms
unfold_more
double_arrow
Asymptotic Notations
double_arrow
Space Complexity of Algorithms
double_arrow
Time Complexity of Algorithms
quiz
Time Complexity of Algorithms
1.
What is the term for the maximum time required for inputs of a given size?
A)
Worst-case time complexity
B)
Average-case time complexity
C)
Best-case time complexity
D)
Expected time complexity
Answer
keyboard_arrow_down
keyboard_arrow_up
A) Worst-case time complexity
Explanation
2.
Which algorithms are quasilinear in time complexity?
A)
Bubble Sort
B)
Insertion Sort
C)
Randomized QuickSort
D)
Selection Sort
Answer
keyboard_arrow_down
keyboard_arrow_up
C) Randomized QuickSort
Explanation
3.
What is the time complexity of the recursive function Fibonacci series?
int fib(int n) { if (n <= 1) return n; return fib(n - 1) + fib(n - 2); }
A)
O(n)
B)
O(logn)
C)
O(2
n
)
D)
O(n
2
)
Answer
keyboard_arrow_down
keyboard_arrow_up
C) O(2
n
)
Explanation
4.
What is the time complexity of a binary search method on a sorted list of length n?
A)
O(1)
B)
O(n)
C)
O(log n)
D)
O(n
2
)
Answer
keyboard_arrow_down
keyboard_arrow_up
C) O(log n)
Explanation
Quick Links
Astronomy
chevron_right
Stars
chevron_right
High-Energy Astrophysics
chevron_right
Space Exploration
chevron_right
Galaxies
Current Affairs & Events
chevron_right
Daily Current Affairs
chevron_right
Latest Current Events
Agriculture
chevron_right
Animal Husbandry
chevron_right
Major Crops and Classification
chevron_right
Processes and Factors of Soil Formation
chevron_right
Pest and Disease Classification
Geography
chevron_right
Climatology
chevron_right
Oceanography
chevron_right
Regional Geography
chevron_right
Geopolitics and Global Issues