What is the time complexity of pop() operation when the stack is implemented using an array?
A. O(1)
B. O(n)
C. O(logn)
D. O(nlogn)
Answer:A
What is the time complexity of pop() operation when the stack is implemented using an array?
A. O(1) B. O(n) C. O(logn) D. O(nlogn)
Explanation: Because pop() only accesses one end of the structure, it takes a fixed amount of time.