Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

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
Explanation: pop() accesses only one end of the structure, and hence constant time.

Join The Discussion