1.Easy
Which notation describes an upper bound on growth?
- ABig Theta
- BLittle omega
- CBig Omega
- DBig O
2.Easy
An algorithm's running time is O(n). What is this growth called?
- AConstant
- BQuadratic
- CLogarithmic
- DLinear
3.Easy
Which notation describes a lower bound on growth?
- AO (Big O)
- BΩ (Big Omega)
- Co (little o)
- DΘ (Big Theta)
4.Medium
Quicksort always uses the first element as pivot. On which input does it show its worst-case behaviour?
- AAn array of length 2
- BAn array whose elements are all different
- CAn array that is already sorted
- DAn array in random order
5.Medium
What is the worst-case time complexity of quicksort?
- AO(log n)
- BO(n)
- CO(n log n)
- DO(n²)
6.Medium
Breadth-first search on an unweighted graph finds:
- AA topological order in all graphs
- BShortest paths in number of edges from the start node
- CShortest paths in graphs that contain negative edge weights
- DThe minimum spanning tree
7.Hard
Strassen's algorithm multiplies matrices using 7 instead of 8 recursive multiplications of half-size blocks. What is its running time?
- AΘ(n² log n)
- BΘ(n³)
- CΘ(n2)
- DΘ(nlog₂ 7), about n2.81
8.Hard
What did the Cook–Levin theorem establish?
- AThe halting problem is undecidable
- BP is not equal to NP
- CThe Boolean satisfiability problem (SAT) is NP-complete
- DEvery NP problem can be solved in exponential time
Answer key
- 1. D · Big O
- 2. D · Linear
- 3. B · Ω (Big Omega)
- 4. C · An array that is already sorted
- 5. D · O(n²)
- 6. B · Shortest paths in number of edges from the start node
- 7. D · Θ(nlog₂ 7), about n2.81
- 8. C · The Boolean satisfiability problem (SAT) is NP-complete
Full step-by-step solutions: practise this topic on examproblems.com.