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

Method popFirst

chapter02/util/LinkedListX.js:67–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65 }
66
67 popFirst() {
68 let first = this.head;
69 if (this.head && this.head.next) {
70 this.head = this.head.next;
71 first.next = null;
72 }
73 else this.head = null;
74 return first;
75 }
76
77 head() {
78 return this.head;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected