MCPcopy Index your code
hub / github.com/loiane/javascript-datastructures-algorithms / push

Method push

src/04-stack/stack.ts:11–13  ·  view source on GitHub ↗

* Pushes an item onto the top of the stack. * @param item - The item to push * @complexity Time O(1) | Space O(1)

(item: T)

Source from the content-addressed store, hash-verified

9 * @complexity Time O(1) | Space O(1)
10 */
11 push(item: T): void {
12 this.items.push(item);
13 }
14
15 /**
16 * Removes and returns the top item; returns undefined if empty.

Callers 15

decimalToBinaryFunction · 0.95
decimalToBinaryFunction · 0.95
decimalToBaseFunction · 0.95
decimalToBase64Function · 0.95
decimalToBaseFunction · 0.95
decimalToBase64Function · 0.95
makeSourceStackFunction · 0.95
dictionary.test.tsFile · 0.45
addToRosterFunction · 0.45
addToRosterFunction · 0.45
flattenRecursiveFunction · 0.45

Calls

no outgoing calls

Tested by 1

makeSourceStackFunction · 0.76