1.Easy
Which complexity class grows fastest for large n?
- AO(n³)
- BO(n²)
- CO(n log n)
- DO(2ⁿ)
2.Easy
Which notation describes a lower bound on growth?
- AO (Big O)
- Bo (little o)
- CΩ (Big Omega)
- DΘ (Big Theta)
3.Easy
What is an algorithm?
- AA finite sequence of well-defined steps that solves a problem
- BA data structure that stores numbers
- CA programming language designed for writing mathematical formulas
- DAny computer program that has a graphical interface
4.Medium
Which sorting algorithm is stable?
- AQuicksort (typical in-place version)
- BHeap sort
- CMerge sort
- DSelection sort (typical version)
5.Medium
Quicksort always uses the first element as pivot. On which input does it show its worst-case behaviour?
- AAn array that is already sorted
- BAn array whose elements are all different
- CAn array in random order
- DAn array of length 2
6.Medium
What does the recurrence T(n) = T(n − 1) + O(1) solve to?
- AO(n²)
- BO(log n)
- CO(n)
- DO(2ⁿ)
7.Hard
How do n! and 2ⁿ compare for large n?
- AThey grow at the same rate
- Bn! grows faster than 2ⁿ
- C2ⁿ grows faster than n!
- Dn! is O(n²)
8.Hard
Which bound is correct for log(n!)?
- AΘ(n log n)
- BΘ(n)
- CΘ(n²)
- DΘ(log n)
Answer key
- 1. D · O(2ⁿ)
- 2. C · Ω (Big Omega)
- 3. A · A finite sequence of well-defined steps that solves a problem
- 4. C · Merge sort
- 5. A · An array that is already sorted
- 6. C · O(n)
- 7. B · n! grows faster than 2ⁿ
- 8. A · Θ(n log n)
Full step-by-step solutions: practise this topic on examproblems.com.