WorksheetsMS101 - Assignment Finals - (Reviewer)
Total questions: 10
Worksheet time: 5mins
What does time complexity measure?
The amount of memory used by an algorithm
The total number of lines in the code
How execution time increases with input size
The accuracy of an algorithm's output
Which of the following is an example of a time complexity class that grows fastest with input size?
Linear (O(n))
Logarithmic (O(log n))
Constant (O(1))
Exponential (O(2ⁿ))
What is the main focus of space complexity?
The maximum time an algorithm can run
The number of recursive calls
The memory used by an algorithm
The size of the output produced
In asymptotic notation, what does Big O represent?
Exact running time
Lower bound
Upper bound
Average case
Which type of time complexity describes the typical performance of an algorithm over all possible inputs?
Best case
Average case
Worst case
Standard case
What does Theta (Θ) notation represent?
Worst-case performance
Average-case time
Tight bound on performance
The slowest algorithm possible
Which time complexity class indicates performance that remains constant regardless of input size?
O(n²)
O(1)
O(log n)
O(n)
Which notation provides the lower bound of an algorithm's running time?
O(n)
Ω (Omega)
Θ (Theta)
o(n)
What does worst-case time complexity represent?
Fastest scenario for the algorithm
Typical running time for most inputs
Maximum time on the largest or most difficult input
Time complexity for random input
Why is analyzing time complexity important?
To determine the color of the program interface
To ensure the code looks clean
To evaluate how well an algorithm scales with large input
To count the number of functions used answer
