File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Stack
2
+ # Stack is an ordered collection of items where the addition of new items and removal items
3
+ # always taken place at same end.
4
+ # So the end is called as top.
5
+ # And the opposite end is known as base.
6
+ # Stack stored items in Last In First Out (LIFO) or First In Last Out (FILO)
7
+ # Stack stores the data element in similiar fashion ,
8
+ # as the bunch of plates are kept one above the another in a kitchen.
9
+
10
+ # If you add an object in a stack it will store in a base and second store top of the 1'st object
11
+ # like that way it will stores
12
+ # If you want to remove the top first object it is called (LIFO)or(FILO)
13
+
1
14
# Stack implementation in python
2
15
3
16
print ("_______________________________________________________" )
@@ -33,3 +46,5 @@ def pop(stack):
33
46
push (stack , str (4 ))
34
47
print ("popped item: " + pop (stack ))
35
48
print ("stack after popping an element: " + str (stack ))
49
+
50
+
You can’t perform that action at this time.
0 commit comments