What is the time complexity of traversing all elements of a one-dimensional array containing N elements?
Options
- A. O(1)
- B. O(log n)
- C. O(n)
- D. More than one of the above
- E. None of the above
Quiz Practice:
C. O(n)
Correct Answer: C. O(n)
Explanation: Traversing an array requires visiting each of its N elements once.