MCPcopy Index your code
hub / github.com/trekhleb/javascript-algorithms / enqueue

Method enqueue

src/data-structures/queue/Queue.js:36–38  ·  view source on GitHub ↗

* Add a new element to the end of the queue (the tail of the linked list). * This element will be processed after all elements ahead of it. * @param {*} value

(value)

Source from the content-addressed store, hash-verified

34 * @param {*} value
35 */
36 enqueue(value) {
37 this.linkedList.append(value);
38 }
39
40 /**
41 * Remove the element at the front of the queue (the head of the linked list).

Callers 3

breadthFirstSearchFunction · 0.95
breadthFirstSearchFunction · 0.95
Queue.test.jsFile · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected