Q. What is Stack? Why is it called LIFO data structure?
Answer =
A stack is a basic data-structure where insertion and deletion of data takes place at one end called the top of the stack. It follows the Last-In-First-Out (LIFO) principle.
A stack is always processed in a LIFO manner wherein the element can be added or remove from the top end of the stack. That is why a stack is also called a LIFO data structure.
Osm
ReplyDeleteGood
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )