MCPcopy Index your code
hub / github.com/careercup/ctci / pop

Method pop

java/Chapter 3/Question3_3/SetOfStacks.java:31–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29 }
30
31 public int pop() {
32 Stack last = getLastStack();
33 int v = last.pop();
34 if (last.size == 0) {
35 stacks.remove(stacks.size() - 1);
36 }
37 return v;
38 }
39
40 public int popAt(int index) {
41 return leftShift(index, true);

Callers 1

mainMethod · 0.95

Calls 4

getLastStackMethod · 0.95
popMethod · 0.95
removeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected