Skip to content

Latest commit

 

History

History
16 lines (9 loc) · 439 Bytes

File metadata and controls

16 lines (9 loc) · 439 Bytes

Stack

This is a simple stack implementation in python using a list.

Basic operations of stack:

Push — Inserts an element at the top

Pop — Returns the top element after removing it from the stack

isEmpty — Returns true if the stack is empty

Peek — Returns the top element without removing it from the stack

size — Returns the length of the list

showItems — prints all the items in the stack