← 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?
- A.O(n²)
- B.O(n log n)
- C.O(n)
- 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 →