MCPcopy Create free account
hub / github.com/careercup/CtCI-6th-Edition-JavaScript / prepend

Method prepend

chapter07/util/LinkedList.js:29–33  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

27 }
28
29 prepend(value) {
30 let node = new Node(value);
31 node.next = this.head;
32 this.head = node;
33 }
34
35 pop() {
36 let cur = this.head;

Callers 1

insertAtMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected