🎙 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 2 of 10

The constraints say n ≤ 10⁵. Which complexity is usually too slow?

The constraints say n ≤ 10⁵. Which complexity is usually too slow?

  1. A.O(n)
  2. B.O(n log n)
  3. C.O(n²)
  4. D.O(log n)
Answer & explanation

Correct answer: O(n²)

10¹⁰ steps is far beyond the rough 10⁸ steps per second that judges allow.

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 →