1.Easy
Which notation describes an upper bound on growth?
- ABig Theta
- BBig O
- CLittle omega
- DBig Omega
2.Easy
What is the time complexity of binary search on a sorted array?
- AO(log n)
- BO(1)
- CO(n log n)
- DO(n)
3.Easy
Which notation describes a lower bound on growth?
- AO (Big O)
- BΩ (Big Omega)
- Co (little o)
- DΘ (Big Theta)
4.Medium
A greedy algorithm:
- ATries every possible solution
- BMakes the locally best choice at each step
- CAlways gives the optimal solution
- DUses only recursion
5.Medium
What does the recurrence T(n) = 2T(n/2) + O(1) solve to?
- AO(log n)
- BO(n)
- CO(n log n)
- DO(n²)
6.Medium
How much stack space does a simple recursive factorial function fact(n) = n × fact(n − 1) use?
- AO(log n)
- BO(n²)
- CO(n)
- DO(1)
7.Hard
The Held–Karp dynamic programming algorithm solves the travelling salesman problem exactly. What is its running time for n cities?
- AO(n!)
- BO(2n²)
- CO(n² 2ⁿ)
- DO(n³)
8.Hard
A problem is NP-complete if it is:
- AOutside NP but harder than all NP problems, such as the halting problem
- BIn NP and every NP problem reduces to it in polynomial time
- CSolvable in polynomial time
- DImpossible to solve
Answer key
- 1. B · Big O
- 2. A · O(log n)
- 3. B · Ω (Big Omega)
- 4. B · Makes the locally best choice at each step
- 5. B · O(n)
- 6. C · O(n)
- 7. C · O(n² 2ⁿ)
- 8. B · In NP and every NP problem reduces to it in polynomial time
Full step-by-step solutions: practise this topic on examproblems.com.