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

Method IsEmpty

structure/deque/deque.go:77–79  ·  view source on GitHub ↗

IsEmpty checks whether Deque is empty or not.

()

Source from the content-addressed store, hash-verified

75
76// IsEmpty checks whether Deque is empty or not.
77func (dq *DoublyEndedQueue[T]) IsEmpty() bool {
78 return len(dq.deque) == 0
79}
80
81// Length gets the length of Deque.
82func (dq *DoublyEndedQueue[T]) Length() int {

Callers 1

TestDequeFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestDequeFunction · 0.36