heap

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMaxHeap

func NewMaxHeap(capacity int) *maxHeap

Types

type PriorityQueue

type PriorityQueue struct {
	// contains filtered or unexported fields
}

func NewPriorityQueue

func NewPriorityQueue(capacity int) *PriorityQueue

func (*PriorityQueue) Dequeue

func (q *PriorityQueue) Dequeue() interface{}

func (*PriorityQueue) Enqueue

func (q *PriorityQueue) Enqueue(e interface{})

func (*PriorityQueue) Front

func (q *PriorityQueue) Front() interface{}

func (*PriorityQueue) IsEmpty

func (q *PriorityQueue) IsEmpty() bool

func (*PriorityQueue) Size

func (q *PriorityQueue) Size() int

Jump to

Keyboard shortcuts

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