What is the time complexity (represented in terms of Big Oh) for performing a push operation when a stack is implemented using an array?

What is the time complexity (represented in terms of Big Oh) for performing a push operation when a stack is implemented using an array? Furthermore, a pointer TOS is used to track the top of the stack, and a variable maxsize to track the maximum size of the stack.

× How can I help you?