MCPcopy Index your code
hub / github.com/betomoedano/JavaScript-Coding-Interview-Questions / push

Method push

stacks/min-stack.js:8–14  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

6 }
7
8 push(element) {
9 this.elements.push(element);
10 if (element < this.min || this.min === undefined) {
11 this.min = element;
12 this.mins.push(element);
13 }
14 }
15
16 pop() {
17 if (this.elements.length > 0) {

Callers 15

runLengthEncodingFunction · 0.45
duplicateEncodeFunction · 0.45
groupAnagramsFunction · 0.45
getPalindromesFunction · 0.45
reverseWordsInStringFunction · 0.45
semordnilapFunction · 0.45
firstNonRepeatingLetterFunction · 0.45
findAnagramsFunction · 0.45
caesarCipherEncryptorFunction · 0.45
combinationHelperFunction · 0.45
findFunction · 0.45
threeNumberSumFunction · 0.45

Calls

no outgoing calls

Tested by 1

getDfsOrderFunction · 0.36