Stack Data Type - LIFO

Moderator: ramajayam

Post Reply
ramajayam
Posts: 10
Joined: Wed Feb 07, 2024 8:28 am

Stack Data Type - LIFO

Post by ramajayam »

Stack:



Stack is a user-defined data structures in python that are used to store data in the Last In First Out (LIFO) manner. In stacks, the insertion and deletion are done at one end, where the end is generally called the top. Since the last element inserted is served and removed first, the stack data structures in python are also known as the Last Come First Served data structure. The most common associated method of stacks are push(), pop(), peek(), isEmpty(), isFull(), size() etc
Post Reply