1.Easy
Which notation describes an upper bound on growth?
- ALittle omega
- BBig O
- CBig Theta
- DBig Omega
2.Easy
What are the three steps of a divide-and-conquer algorithm?
- ADivide, conquer, combine
- BGuess, check, repeat
- CRead, compute, write
- DSort, search, return
3.Easy
What does it mean if an operation runs in O(1) time?
- AIt can only be run once
- BIt always takes exactly one second
- CIt processes exactly one element per second of running time
- DIts running time does not grow with the input size
4.Medium
What is the time complexity of the Bellman–Ford algorithm on a graph with V vertices and E edges?
- AO(V³ × E)
- BO(V × E)
- CO(E log V)
- DO(V + E)
5.Medium
A function runs one loop of n iterations and then, separately, another loop of n iterations. What is its time complexity?
- AO(n)
- BO(n²)
- CO(log n)
- DO(2ⁿ)
6.Medium
Why does dynamic programming give no real speed-up for merge sort?
- AMerge sort is already O(n)
- BDynamic programming only works on graph problems, not on arrays
- CMerge sort has no recursive structure
- DIts subproblems do not overlap, so there is nothing to reuse
7.Hard
Using the master theorem, T(n) = 8T(n/2) + O(n²) solves to:
- AΘ(n²)
- BΘ(n³)
- CΘ(n log n)
- DΘ(n² log n)
8.Hard
Strassen's algorithm multiplies matrices using 7 instead of 8 recursive multiplications of half-size blocks. What is its running time?
- AΘ(nlog₂ 7), about n2.81
- BΘ(n² log n)
- CΘ(n2)
- DΘ(n³)
Answer key
- 1. B · Big O
- 2. A · Divide, conquer, combine
- 3. D · Its running time does not grow with the input size
- 4. B · O(V × E)
- 5. A · O(n)
- 6. D · Its subproblems do not overlap, so there is nothing to reuse
- 7. B · Θ(n³)
- 8. A · Θ(nlog₂ 7), about n2.81
Full step-by-step solutions: practise this topic on examproblems.com.