MCPcopy
hub / github.com/careercup/CtCI-6th-Edition-JavaScript / pop

Method pop

chapter03/3.2 - Stack Min/stackMin.js:21–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19 }
20
21 pop() {
22 let value = super.pop();
23 if (value == this._minStack.peek()) {
24 this._minStack.pop();
25 this._min = this._minStack.peek();
26 }
27 return value;
28 }
29
30 min() {
31 return this._min;

Callers 7

addMethod · 0.45
removeMethod · 0.45
peekMethod · 0.45
stackMin.jsFile · 0.45
threeInOne.jsFile · 0.45
sortStackFunction · 0.45
sortStack.jsFile · 0.45

Calls 1

peekMethod · 0.45

Tested by

no test coverage detected