Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/TheAlgorithms/Go
/ Push
Method
Push
sort/heapsort.go:53–58 ·
view source on GitHub ↗
(i Comparable)
Source
from the content-addressed store, hash-verified
51
}
52
53
func
(h *MaxHeap) Push(i Comparable) {
54
h.slice = append(h.slice, i)
55
h.updateidx(h.heapSize)
56
h.heapifyUp(h.heapSize)
57
h.heapSize++
58
}
59
60
func
(h MaxHeap) Size() int {
61
return
h.heapSize
Callers
1
Dijkstra
Method · 0.95
Calls
2
updateidx
Method · 0.95
heapifyUp
Method · 0.95
Tested by
no test coverage detected