Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Heap ¶
type Heap interface { Size() int IsEmpty() bool Insert(interface{}, interface{}) Delete() (interface{}, interface{}) Peek() (interface{}, interface{}) ContainsKey(interface{}) bool ContainsValue(interface{}) bool }
Heap represents a heap (priority queue) data structure
func NewMaxHeap ¶
NewMaxHeap creates a new max-heap (priority queue)
func NewMinHeap ¶
NewMinHeap creates a new min-heap (priority queue)
Click to show internal directories.
Click to hide internal directories.