heap

package
v0.0.0-...-8aec21d Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2022 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 Min

type Min[T Ordered[T]] struct {
	// contains filtered or unexported fields
}

func NewMin

func NewMin[T Ordered[T]]() Min[T]

func (*Min[T]) Len

func (h *Min[T]) Len() int

func (*Min[T]) Pop

func (h *Min[T]) Pop() T

func (*Min[T]) Push

func (h *Min[T]) Push(x T)

type Ordered

type Ordered[T any] interface {
	// Less should return true if element's value is less than v
	Less(v T) bool
}

Jump to

Keyboard shortcuts

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