Summary
Keywords
Full Transcript
Understand the working of Stack Data structure. Stack is a linear data structure which operates in a LIFO(Last In First Out) or FILO (First In Last Out) pattern. It is named stack as it behaves like a real-world stack, for example – a deck of cards or a pile of plates, etc. Stack is an abstract data type with a bounded (predefined) capacity. It is a simple data structure that allows adding and removing elements in a particular order. The order may be LIFO(Last In First Out) or FILO(First In Last Out). Standard Stack Operations - 1) push() - Place an item onto the stack. If there is no place for new item, stack is in overflow state. 2) pop() - Return the item at the top of the stack and then remove it. If pop is called when stack is empty, it is in an underflow state. 3) isEmpty() - Tells if the stack is empty or not 4) isfull() - Tells if the stack is full or not. 5) peek() - Access the item at the i position 6) count() - Get the number of items in the stack. 7) change() - Change the item at the i position 8) display() - Display all items in the stack --------------------------------------------------------------------------------------------- Full DSA playlist - https://www.youtube.com/watch?v=XCyuHSJS7XE&list=PLIY8eNdw5tW_zX3OCzX7NJ8bL1p6pWfgG Full Article on our official website - https://simplesnippets.tech/what-is-stack-data-structure-c-program-to-implement-stack-ds-operations/ --------------------------------------------------------------------------------------------- Support Simple Snippets by Donations - Google Pay UPI ID - tanmaysakpal11@okicici PayPal - paypal.me/tanmaysakpal11 --------------------------------------------------------------------------------------------- Simple Snippets Official Website - http://simplesnippets.tech/ Simple Snippets on Facebook - https://www.facebook.com/simplesnippets/ Simple Snippets on Instagram - https://www.instagram.com/simplesnippets/ Simple Snippets on Twitter - https://twitter.com/simplesnippet Simple Snippets Google Plus Page - https://plus.google.com/+SimpleSnippets Simple Snippets email ID - [email protected] For More Technology News, Latest Updates and Blog articles visit our Official Website - http://simplesnippets.tech/ #stack #datastructure #stackdatastructure #stackoperations
