Documentation
¶
Overview ¶
Package heap is a heap container package.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Heap ¶
Heap returns a Heap interface.
Example ¶
hp := New[int]() hp.Push(3) hp.Push(2) hp.Push(5) fmt.Println(hp.Pop()) fmt.Println("Empty:", hp.Empty()) fmt.Println("Size:", hp.Size())
Output: 2 Empty: false Size: 2
func NewWithLess ¶
NewWithLess returns a new Heap container with custom less function.
Click to show internal directories.
Click to hide internal directories.