Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update README.md
  • Loading branch information
yanglbme authored Aug 23, 2021
commit 4b7734f8a0a55e4ae43d60e677e56f6975fe525e
8 changes: 3 additions & 5 deletions DataStructures/Stacks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@

stack is an ADT (abstract data type ) that act like list of objects but there is a diffrents.

stack act is * LIFO * (Last In First Out), it means that when we want to get an element from the stack we get the last element in the

stack.
stack act is *LIFO* (Last In First Out), it means that when we want to get an element from the stack we get the last element in the stack.

stack is bast on two methods ( functions)

## push & pop

** push: ** add an alement to last index of stack.
**push**: add an alement to last index of stack.

for example: we have `1, 3, 5` in stack, then we call push(9),

`9` will add to last index of stack -> `1, 3, 5 , 9`


** pop: ** remove the last element from stack.
**pop**: remove the last element from stack.
for example: we have `1, 3, 5 , 9` in stack, then we call pop(),

the function will return `9` and the stack will change to `1, 3, 5`.