Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/trekhleb/javascript-algorithms
/ parent
Method
parent
src/data-structures/heap/Heap.js:89–91 ·
view source on GitHub ↗
* @param {number} childIndex * @return {*}
(childIndex)
Source
from the content-addressed store, hash-verified
87
* @
return
{*}
88
*/
89
parent(childIndex) {
90
return
this.heapContainer[this.getParentIndex(childIndex)];
91
}
92
93
/**
94
* @param {number} indexOne
Callers
2
remove
Method · 0.95
heapifyUp
Method · 0.95
Calls
1
getParentIndex
Method · 0.95
Tested by
no test coverage detected