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

Method peek

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

Source from the content-addressed store, hash-verified

43
44 # peek
45 def peek(self):
46 if self.isEmpty():
47 print("there is no element in the stack")
48 else:
49 nodeValue=self.LinkedList.head.value
50 return nodeValue
51
52
53

Callers 8

infix2PrefixMethod · 0.95
isBalancedMethod · 0.95
mergeMethod · 0.95
checkBalancedMethod · 0.95
infixToPostFixMethod · 0.95
reverseWordsMethod · 0.95

Calls 2

isEmptyMethod · 0.95
printFunction · 0.50

Tested by

no test coverage detected