🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.The answer is always a formula
  2. B.Trying all subsets (about 2²⁰ ≈ 10⁶) may be intended
  3. C.Only O(1) solutions are accepted
  4. 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 →