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

Method pop

13_Stacks/StackAL.java:15–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13 }
14
15 public int pop() {
16 if(isEmpty()) {
17 return -1;
18 }
19 int top = list.remove(list.size()-1);
20 return top;
21 }
22
23 public int peek() {
24 if(isEmpty()) {

Callers 1

mainMethod · 0.95

Calls 2

isEmptyMethod · 0.95
removeMethod · 0.80

Tested by

no test coverage detected