Versions in this module Expand all Collapse all v0 v0.0.1 Apr 18, 2023 Changes in this version + type MaxHeap struct + func New(values ...T) *MaxHeap[T] + func (mh *MaxHeap[T]) Add(element T) + func (mh *MaxHeap[T]) Clear() + func (mh *MaxHeap[T]) GetLeftChildIndex(parent int) int + func (mh *MaxHeap[T]) GetParentIndex(child int) int + func (mh *MaxHeap[T]) GetRightChildIndex(parent int) int + func (mh *MaxHeap[T]) HasLeftChild(parent int) bool + func (mh *MaxHeap[T]) HasParent(child int) bool + func (mh *MaxHeap[T]) HasRightChild(parent int) bool + func (mh *MaxHeap[T]) IsEmpty() bool + func (mh *MaxHeap[T]) LeftChild(parent int) T + func (mh *MaxHeap[T]) Parent(child int) T + func (mh *MaxHeap[T]) Peek() (T, error) + func (mh *MaxHeap[T]) Poll() (T, error) + func (mh *MaxHeap[T]) RightChild(parent int) T + func (mh *MaxHeap[T]) Size() int + func (mh *MaxHeap[T]) String() string + func (mh *MaxHeap[T]) Values() []T