Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/TheAlgorithms/Go
/ updateidx
Method
updateidx
sort/heapsort.go:70–72 ·
view source on GitHub ↗
(i int)
Source
from the content-addressed store, hash-verified
68
}
69
70
func
(h MaxHeap) updateidx(i int) {
71
h.indices[h.slice[i].Idx()] = i
72
}
73
74
func
(h *MaxHeap) swap(i, j int) {
75
h.slice[i], h.slice[j] = h.slice[j], h.slice[i]
Callers
3
Pop
Method · 0.95
Push
Method · 0.95
swap
Method · 0.95
Calls
1
Idx
Method · 0.65
Tested by
no test coverage detected