1.Easy
Which of these grows slowest as n becomes large?
- AO(n log n)
- BO(n)
- CO(n²)
- DO(log n)
2.Easy
Which notation describes a lower bound on growth?
- AΘ (Big Theta)
- Bo (little o)
- CΩ (Big Omega)
- DO (Big O)
3.Easy
How much extra memory does a standard array-based merge sort use?
- AO(log n)
- BO(n²)
- CO(1)
- DO(n)
4.Medium
In the activity selection problem, which greedy rule always gives a maximum number of non-overlapping activities?
- APick the shortest activity first
- BPick the activity with the fewest overlaps first, then repeat with the compatible ones
- CPick the activity that finishes earliest, then repeat with the compatible ones
- DPick the activity that starts earliest
5.Medium
What is the time complexity of computing the n-th Fibonacci number with a bottom-up table?
- AO(2ⁿ)
- BO(n)
- CO(log n)
- DO(n²)
6.Medium
Why is the base of a logarithm usually left out in Big O, as in O(log n)?
- ALogarithms are always rounded to integers
- BLogarithms with different bases differ only by a constant factor
- CThe base only matters for small n
- DAll logarithms in computer science have base 10, so it is implied
7.Hard
Why can Dijkstra's algorithm give wrong results when some edge weights are negative?
- AA vertex is finalised when extracted, but a later negative edge could still give it a shorter path
- BNegative numbers cannot be stored in a priority queue
- CIt only works on undirected graphs
- DIt goes into an infinite loop on every negative edge
8.Hard
Using the master theorem, T(n) = 8T(n/2) + O(n²) solves to:
- AΘ(n² log n)
- BΘ(n log n)
- CΘ(n³)
- DΘ(n²)
Answer key
- 1. D · O(log n)
- 2. C · Ω (Big Omega)
- 3. D · O(n)
- 4. C · Pick the activity that finishes earliest, then repeat with the compatible ones
- 5. B · O(n)
- 6. B · Logarithms with different bases differ only by a constant factor
- 7. A · A vertex is finalised when extracted, but a later negative edge could still give it a shorter path
- 8. C · Θ(n³)
Full step-by-step solutions: practise this topic on examproblems.com.