Stacks Python Implementation | Computer Science Class XII | CBSE | Tamil

Опубликовано: 05 Ноябрь 2024
на канале: Programming For Fun
6,730
208

Stack
---------
A stack is a mechanism that implements LIFO arrangement hence elements are added and deleted from the stack at one end only. The end from which elements are added or deleted is called TOP of the stack. Two fundamental
operations performed on the stack are PUSH and POP. we will learn about them and implement them using Python.

PUSH and POP Operations
-------------------------------------------
• PUSH adds a new element at the TOP of the stack. It is an insertion operation. We can add elements to a stack until it is full. A stack is full when no more elements can be added to it. Trying to add an element to a full stack results in an exception called ‘overflow’.

• POP operation is used to remove the top most element of the stack, that is, the element at the TOP of the stack. It is a delete operation. We can delete elements from a stack until it is empty i.e. there is no element in it. Trying to delete an element from an empty stack results in an exception called ‘underflow’

For Admissions: https://greatvalueacademy.in/

Find us on Google: https://g.page/great-value-academy


#stack #python #cbse #class12 #tamil #ip #computerscience #computersciencestudent #sql #xii #cbsecomputerScience #stacks #stack #tower