← 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?
- A.An exponential approach such as trying all subsets (2¹⁸ ≈ 2.6 lakh) may be intended
- B.Only an O(log n) solution will pass
- C.The problem cannot be solved
- 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 →