Documentation
¶
Overview ¶
Package maxheap is an implementation of minheap data structure in go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Heap ¶
type Heap struct {
// contains filtered or unexported fields
}
Heap struct contains data and methods for heap implementation
func BuildHeap ¶
BuildHeap builds heap structure from an unorganized data list Time complexity of building a heap is O(n)
func (*Heap) ExtractMax ¶
ExtractMax returns the maximum value (i.e. root) in the heap and removes it from the heap. Returns error, if heap is empty
Click to show internal directories.
Click to hide internal directories.