Documentation
¶
Index ¶
- type Item
- type PriorityQueue
- func (pq *PriorityQueue) Contains(key int) bool
- func (pq *PriorityQueue) GetItem(key int) (Item, error)
- func (pq PriorityQueue) Len() int
- func (pq PriorityQueue) Less(i, j int) bool
- func (pq *PriorityQueue) Pop() interface{}
- func (pq *PriorityQueue) Push(x interface{})
- func (pq PriorityQueue) Swap(i, j int)
- func (pq *PriorityQueue) Update(key int, priority int) error
- type TreeNode
- type Vertex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
Item is an Item that can be inserted into a PriorityQueue
type PriorityQueue ¶
type PriorityQueue struct {
// contains filtered or unexported fields
}
PriorityQueue implements heap.Interface
func NewPriorityQueue ¶
func NewPriorityQueue() PriorityQueue
NewPriorityQueue returns a PriorityQueue
func (*PriorityQueue) Contains ¶
func (pq *PriorityQueue) Contains(key int) bool
Contains returns bool representing the presences/lack thereof of the Item with the corresponding key in the heap
func (*PriorityQueue) GetItem ¶
func (pq *PriorityQueue) GetItem(key int) (Item, error)
GetItem returns an item in the heap by key if it is on the heap.
func (PriorityQueue) Less ¶
func (pq PriorityQueue) Less(i, j int) bool
Less implements sort.Interface
func (*PriorityQueue) Pop ¶
func (pq *PriorityQueue) Pop() interface{}
Pop implements heap.Interface
func (*PriorityQueue) Push ¶
func (pq *PriorityQueue) Push(x interface{})
Push implements heap.Interface
Source Files
¶
- 0032-longest_valid_parentheses.go
- 0062-unique_paths.go
- 0064-min_sum_path.go
- 0100-same_tree.go
- 0111-min-depth.go
- 0207-course_schedule_1.go
- 0210-course_schedule_2.go
- 0513-bottom_left.go
- 0658-k_closest_elements.go
- 0743-network_delay_time.go
- 0887-super_egg_drop.go
- 0938-range_sum_bst.go
- 1036-escape_large_maze.go
- util.go
Click to show internal directories.
Click to hide internal directories.