heap

package
v0.0.0-...-88eb295 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Heap

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

func NewHeap

func NewHeap(cap int, isMinHeap bool) *Heap

func (*Heap) Insert

func (h *Heap) Insert(k int)

func (*Heap) IsEmpty

func (h *Heap) IsEmpty() bool

func (*Heap) IsFull

func (h *Heap) IsFull() bool

func (*Heap) Pop

func (h *Heap) Pop() int

func (*Heap) Top

func (h *Heap) Top() int

func (*Heap) TopK

func (h *Heap) TopK(k int) []int

Jump to

Keyboard shortcuts

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