Heap

package
v0.0.0-...-f9b1802 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MaxHeap

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

func NewMaxHeap

func NewMaxHeap() *MaxHeap

func (*MaxHeap) IsEmpty

func (h *MaxHeap) IsEmpty() bool

func (MaxHeap) Pop

func (h MaxHeap) Pop() int

func (*MaxHeap) Push

func (h *MaxHeap) Push(v int)

新增元素

func (*MaxHeap) Size

func (h *MaxHeap) Size() int

type Ordered

type Ordered interface {
	Less(other Ordered) bool
}

Jump to

Keyboard shortcuts

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