Question DSA-CX-0006
EasyWhat is the time complexity of two nested loops, each running n times?
- A.
O(n)
- B.
O(log n)
- C.
O(n²)
- D.
O(2n)
Show answer and explanation
Answer: C
The inner loop runs n times for each of the n outer iterations: n × n operations.