Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/careercup/CtCI-6th-Edition-JavaScript
/ popFirst
Method
popFirst
chapter03/util/LinkedList.js:54–62 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
52
}
53
54
popFirst() {
55
let
first = this.head;
56
if
(this.head && this.head.next) {
57
this.head = this.head.next;
58
first.next = null;
59
}
60
else
this.head = null;
61
return
first;
62
}
63
64
head() {
65
return
this.head;
Callers
1
dequeue
Method · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected