MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / MaxHeap

Struct MaxHeap

sort/heapsort.go:11–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9import "github.com/TheAlgorithms/Go/constraints"
10
11type MaxHeap struct {
12 slice []Comparable
13 heapSize int
14 indices map[int]int
15}
16
17func (h *MaxHeap) Init(slice []Comparable) {
18 if slice == nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected