maxheap

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 1 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[T constraints.Ordered] []T

最大堆 可用于保留前n个最小元素

func New

func New[T constraints.Ordered](l int) MaxHeap[T]

func NewFromArray

func NewFromArray[T constraints.Ordered](arr []T) MaxHeap[T]

func (MaxHeap[T]) Put

func (heap MaxHeap[T]) Put(val T)

Jump to

Keyboard shortcuts

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