MCPcopy Index your code
hub / github.com/trekhleb/javascript-algorithms / getLeftChildIndex

Method getLeftChildIndex

src/data-structures/heap/Heap.js:25–27  ·  view source on GitHub ↗

* @param {number} parentIndex * @return {number}

(parentIndex)

Source from the content-addressed store, hash-verified

23 * @return {number}
24 */
25 getLeftChildIndex(parentIndex) {
26 return (2 * parentIndex) + 1;
27 }
28
29 /**
30 * @param {number} parentIndex

Callers 3

hasLeftChildMethod · 0.95
leftChildMethod · 0.95
heapifyDownMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected