What is the time complexity of the push and pop operations in a stack implemented using an array?
Options
- A. O(1)
- B. O(n)
- C. O(log n)
- D. More than one of the above
- E. None of the above
Quiz Practice:
A. O(1)
Correct Answer: A. O(1)
Explanation: Both push and pop operations take constant time in a standard array-based stack.