package
Version:
v0.5.0
Opens a new window with list of versions in this module.
Published: Apr 5, 2024
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Heap[E any] struct {
Slice []E
Less func(E, E) bool
}
func New[E any](less func(E, E) bool, items ...E) *Heap[E]
func (h *Heap[E]) Peek() E
func (h *Heap[E]) Pop() E
func (h *Heap[E]) Push(item E)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.