🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Time & Space Complexity Quiz: all 8 questions

Time & Space Complexity Quiz · Question 5 of 8

An array has n ≤ 100,000 elements. Which solution is likely too slow for a typical 1-second limit?

An array has n ≤ 100,000 elements. Which solution is likely too slow for a typical 1-second limit?

  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²)

100,000² = 10¹⁰ operations — far more than the ~10⁸ a computer does per second.

Can you get the rest right without peeking?

Take the timed Time & Space Complexity Quiz quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →