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

Method dequeue

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

* Remove the element at the front of the queue (the head of the linked list). * If the queue is empty, return null. * @return {*}

()

Source from the content-addressed store, hash-verified

43 * @return {*}
44 */
45 dequeue() {
46 const removedHead = this.linkedList.deleteHead();
47 return removedHead ? removedHead.value : null;
48 }
49
50 /**
51 * @param [callback]

Callers 3

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

Calls 1

deleteHeadMethod · 0.45

Tested by

no test coverage detected