1.Easy
Which notation describes an upper bound on growth?
- ABig Theta
- BLittle omega
- CBig Omega
- DBig O
2.Easy
What is O(2ⁿ) growth called?
- APolynomial
- BLogarithmic
- CExponential
- DLinear
3.Easy
A problem is usually called tractable if:
- AIt can be solved in constant time
- BIt has no solution
- CIt can only be solved by trying every possibility
- DIt can be solved in polynomial time
4.Medium
What does the recurrence T(n) = 2T(n/2) + O(1) solve to?
- AO(log n)
- BO(n log n)
- CO(n²)
- DO(n)
5.Medium
What is the time complexity of the standard dynamic programming algorithm for the longest common subsequence of strings of lengths m and n?
- AO(2m+n)
- BO(mn)
- CO(mn log n)
- DO(m + n)
6.Medium
Which sorting algorithm is stable?
- AQuicksort (typical in-place version)
- BMerge sort
- CSelection sort (typical version)
- DHeap sort
7.Hard
Which algorithm finds a minimum spanning tree by repeatedly adding the cheapest edge that does not form a cycle?
- APrim's algorithm starting from one node
- BKruskal's algorithm
- CDijkstra's algorithm
- DFloyd–Warshall
8.Hard
Taking both endpoints of every edge in a maximal matching gives a vertex cover. How good is this cover?
- AAt most twice the size of a minimum vertex cover
- BAt most log n times the minimum
- CAlways a minimum vertex cover
- DOf unknown quality compared to the optimum
Answer key
- 1. D · Big O
- 2. C · Exponential
- 3. D · It can be solved in polynomial time
- 4. D · O(n)
- 5. B · O(mn)
- 6. B · Merge sort
- 7. B · Kruskal's algorithm
- 8. A · At most twice the size of a minimum vertex cover
Full step-by-step solutions: practise this topic on examproblems.com.