← Quiz: Approaching DSA Interview Problems: all 10 questions
Quiz: Approaching DSA Interview Problems · Question 3 of 10
A problem says n ≤ 20. What does that suggest?
A problem says n ≤ 20. What does that suggest?
- A.The answer is always a formula
- B.Trying all subsets (about 2²⁰ ≈ 10⁶) may be intended
- C.Only O(1) solutions are accepted
- D.The problem cannot be solved
Answer & explanation
Correct answer: Trying all subsets (about 2²⁰ ≈ 10⁶) may be intended
Very small n is a hint that exponential methods such as bitmasks or backtracking fit.
Can you get the rest right without peeking?
Take the timed Quiz: Approaching DSA Interview Problems quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →