Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Heapq ¶
type Heapq[T any] struct { // contains filtered or unexported fields }
Heapq represents a priority queue implemented using a binary heap.
func (*Heapq[T]) Peek ¶
Peek returns the item with the highest priority without removing it from the heap. It returns an error if the heap is empty.
func (*Heapq[T]) Pop ¶
Pop removes and returns the item with the highest priority (i.e., the smallest priority value). It returns an error if the heap is empty.
Click to show internal directories.
Click to hide internal directories.