MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / EnqueueRear

Method EnqueueRear

structure/deque/deque.go:32–34  ·  view source on GitHub ↗

EnqueueRear adds an item at the rear of Deque.

(item T)

Source from the content-addressed store, hash-verified

30
31// EnqueueRear adds an item at the rear of Deque.
32func (dq *DoublyEndedQueue[T]) EnqueueRear(item T) {
33 dq.deque = append(dq.deque, item)
34}
35
36// DequeueFront deletes an item from front of Deque and returns it.
37func (dq *DoublyEndedQueue[T]) DequeueFront() (T, error) {

Callers 1

TestDequeFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestDequeFunction · 0.64