Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LeftistHeap ¶
type LeftistHeap struct {
// contains filtered or unexported fields
}
LeftistHeap is a leftist heap implementation.
func (*LeftistHeap) DeleteMin ¶
func (h *LeftistHeap) DeleteMin() heap.Item
DeleteMin deletes the minimum value and returns it. The complexity is O(log n) amortized.
func (*LeftistHeap) FindMin ¶
func (h *LeftistHeap) FindMin() heap.Item
FindMin finds the minimum value. The complexity is O(1).
func (*LeftistHeap) Init ¶
func (h *LeftistHeap) Init() *LeftistHeap
Init initializes or clears the LeftistHeap
Click to show internal directories.
Click to hide internal directories.