1.Easy
How much extra memory does a standard array-based merge sort use?
- AO(1)
- BO(n)
- CO(log n)
- DO(n²)
2.Easy
What is O(2ⁿ) growth called?
- ALinear
- BPolynomial
- CLogarithmic
- DExponential
3.Easy
What is the worst-case time complexity of merge sort?
- AO(n)
- BO(n²)
- CO(n log n)
- DO(log n)
4.Medium
What is the worst-case time complexity of quicksort?
- AO(n²)
- BO(n)
- CO(n log n)
- DO(log n)
5.Medium
What does it mean that a problem has optimal substructure?
- AThe problem has exactly one optimal solution, which every subproblem shares
- BAn optimal solution can be built from optimal solutions of its subproblems
- CThe problem can be solved in constant time
- DEvery subproblem has the same size
6.Medium
Is it correct to say that an O(n²) algorithm is also O(n³)?
- AYes, but only if n is smaller than 100
- BYes, because Big O is an upper bound and n² grows no faster than n³
- CNo, because Big O must always state the exact growth rate of the function
- DNo, because n³ is smaller than n² for large n
7.Hard
Which of these satisfiability problems is known to be solvable in polynomial time?
- ACircuit satisfiability
- BGeneral SAT on formulas in conjunctive normal form
- C2-SAT, where each clause has at most two literals
- D3-SAT, where each clause has exactly three literals
8.Hard
Which definition of the class NP is correct?
- AProblems that no algorithm can solve
- BDecision problems whose yes-answers can be verified in polynomial time given a certificate
- CProblems that cannot be solved in polynomial time
- DProblems that are not polynomial
Answer key
- 1. B · O(n)
- 2. D · Exponential
- 3. C · O(n log n)
- 4. A · O(n²)
- 5. B · An optimal solution can be built from optimal solutions of its subproblems
- 6. B · Yes, because Big O is an upper bound and n² grows no faster than n³
- 7. C · 2-SAT, where each clause has at most two literals
- 8. B · Decision problems whose yes-answers can be verified in polynomial time given a certificate
Full step-by-step solutions: practise this topic on examproblems.com.