Stack

Last-In First-Out (LIFO) data structure operations across all 6 languages.

Push

Adds an element to the top of the stack (O(1)).

Loading...

Pop

Removes and returns the top element of the stack (O(1)).

Loading...

Peek

Returns the top element without removing it (O(1)).

Loading...