MCPcopy Create free account
hub / github.com/betomoedano/JavaScript-Coding-Interview-Questions / push

Method push

stacks/triple-stack.js:24–28  ·  view source on GitHub ↗
(stack, value)

Source from the content-addressed store, hash-verified

22 }
23
24 push(stack, value) {
25 let idx = this._getLength(stack) * 3 + stack - 1;
26 this._array[idx] = value;
27 ++this._lengths[stack - 1];
28 }
29
30 pop(stack) {
31 let length = this._getLength(stack),

Callers 1

triple-stack.jsFile · 0.45

Calls 1

_getLengthMethod · 0.95

Tested by

no test coverage detected