Stack

Stack #

Push #

Pop #

Peek #

Time Complexity #

OperationTime ComplexityNotes
PushO(1)
PopO(1)Check if the stack is empty first
PeekO(1)Retrieves without removing