pqueue

package
v0.0.0-...-af5906d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

PriorityQueue

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item[T any] struct {
	// contains filtered or unexported fields
}

type PQueue

type PQueue[T any] struct {
	// contains filtered or unexported fields
}

func NewMaxPriorityQueue

func NewMaxPriorityQueue[T any]() *PQueue[T]

func NewMinPriorityQueue

func NewMinPriorityQueue[T any]() *PQueue[T]

func (*PQueue[T]) Len

func (pq *PQueue[T]) Len() int

func (*PQueue[T]) Pop

func (pq *PQueue[T]) Pop() (int, T)

func (*PQueue[T]) Push

func (pq *PQueue[T]) Push(priority int, value T)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL