What is a Stack? Data Structure | Computer Science |

Опубликовано: 25 Июнь 2026
на канале: techymon
130
5

You've been to a cafeteria, right? and seen a stack of plates? When a clean plate is added to the stack, it is put on the top. When a plate is needed to be removed, again, it will be removed only from the top. So it is called Last-In-First-Out (LIFO) as you can only take that plate that was added last.

Stack in computer science is exactly like this, except it holds elements like numbers, characters, etc. In this, Numbers are also added only at the end and also can be accessed and popped only from the end.

Thank You !!!