maxheap

package
v0.0.0-...-cde68c2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEmpty

func IsEmpty(maxheap MaxHeap) bool

Types

type MaxHeap

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

func CreateMaxHeap

func CreateMaxHeap(capacity int) MaxHeap

func (MaxHeap) Data

func (heap MaxHeap) Data() []int

func (*MaxHeap) ExtractMax

func (heap *MaxHeap) ExtractMax() int

func (*MaxHeap) Insert

func (heap *MaxHeap) Insert(item int)

Motify inner data, should use *

func (MaxHeap) PrintLine

func (heap MaxHeap) PrintLine()

func (MaxHeap) PrintTree

func (heap MaxHeap) PrintTree()

PrintHeap: 100个100以内的数字

func (MaxHeap) Size

func (heap MaxHeap) Size() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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