🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: The Online Coding Assessment: all 10 questions

Quiz: The Online Coding Assessment · Question 5 of 10

A problem says n ≤ 18. What does that suggest?

A problem says n ≤ 18. What does that suggest?

  1. A.An exponential approach such as trying all subsets (2¹⁸ ≈ 2.6 lakh) may be intended
  2. B.Only an O(log n) solution will pass
  3. C.The problem cannot be solved
  4. D.You must use a database
Answer & explanation

Correct answer: An exponential approach such as trying all subsets (2¹⁸ ≈ 2.6 lakh) may be intended

Very small limits usually mean brute force over subsets or permutations is acceptable.

Can you get the rest right without peeking?

Take the timed Quiz: The Online Coding Assessment quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →