MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / pop

Method pop

Python/stack using linked list.py:36–42  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

34
35 #pop
36 def pop(self):
37 if self.isEmpty():
38 print("there is no element in the stack")
39 else:
40 nodeValue=self.LinkedList.head.value
41 self.LinkedList.head=self.LinkedList.head.next
42 return nodeValue
43
44 # peek
45 def peek(self):

Callers 1

Calls 2

isEmptyMethod · 0.95
printFunction · 0.50

Tested by

no test coverage detected