MCPcopy Index your code
hub / github.com/careercup/CtCI-6th-Edition-JavaScript / push

Method push

chapter03/3.2 - Stack Min/stackMin.js:13–19  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

11 }
12
13 push(value) {
14 super.push(value);
15 if (this._min == null || value <= this._min) {
16 this._min = value;
17 this._minStack.push(value);
18 }
19 }
20
21 pop() {
22 let value = super.pop();

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

no outgoing calls

Tested by

no test coverage detected