MCPcopy Create free account
hub / github.com/apna-college/Alpha / pop

Method pop

13_Stacks/StackLL.java:30–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 }
29
30 public static int pop() {
31 if(isEmpty()) {
32 return -1;
33 }
34 Node top = head;
35 head = head.next;
36 return top.data;
37 }
38
39 public static int peek() {
40 if(isEmpty()) {

Callers 15

mainMethod · 0.95
mainMethod · 0.95
stockSpanMethod · 0.95
mainMethod · 0.95
isValidMethod · 0.95
checkDuplicateMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
isValidMethod · 0.95
isDuplicateMethod · 0.95
maxAreaMethod · 0.95
maxAreaMethod · 0.95

Calls 1

isEmptyMethod · 0.95

Tested by

no test coverage detected