Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 577 Bytes

Stack.md

File metadata and controls

5 lines (3 loc) · 577 Bytes

Stacks

The stack is a linear data structure that is used to store the collection of objects. It is based on Last-In-First-Out (LIFO). Java collection framework provides many interfaces and classes to store the collection of objects. One of them is the Stack class that provides different operations such as push, pop, search, etc.

The stack data structure has the two most important operations that are push and pop. The push operation inserts an element into the stack and pop operation removes an element from the top of the stack. Let's see how they work on stack.