MCPcopy Create free account
hub / github.com/Ayush7614/Daily-Coding-DS-ALGO-Practice / pop

Method pop

Data Structures/Stack/Python/Stack.py:21–28  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

19 self.__head = new_node
20
21 def pop(self):
22 # deletes element from beginning
23 if self.isEmpty():
24 print("Stack is empty.")
25 return
26 self.__size -= 1
27 print(self.__head.data)
28 self.__head = self.__head.ref
29
30 def top(self):
31 # prints the topmost element, i.e, head in the case of LL

Callers 15

zigzagLevelOrderMethod · 0.95
infixToPostfixMethod · 0.95
isparMethod · 0.95
nextLargerElementMethod · 0.95
bfscycleMethod · 0.45
postOrderTraversalFunction · 0.45
insert_treeMethod · 0.45
preOrderMethod · 0.45
inOrderMethod · 0.45
postOrderMethod · 0.45
levelOrderMethod · 0.45
sumOfLeftLeavesFunction · 0.45

Calls 2

isEmptyMethod · 0.95
printFunction · 0.50

Tested by

no test coverage detected