Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/betty200744/ultimate-go
/ Enqueue
Method
Enqueue
algorithms/data-structures/queue/queue.go:40–43 ·
view source on GitHub ↗
(value interface{})
Source
from the content-addressed store, hash-verified
38
return
q.queue[0], true
39
}
40
func
(q *Queue) Enqueue(value
interface
{}) {
41
q.queue = append(q.queue, value)
42
q.len++
43
}
44
func
(q *Queue) Dequeue()
interface
{} {
45
el := q.queue[0]
46
q.queue = q.queue[1:]
Callers
1
Test_Queue
Function · 0.80
Calls
no outgoing calls
Tested by
1
Test_Queue
Function · 0.64