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

Method hasLeftChild

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

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

(parentIndex)

Source from the content-addressed store, hash-verified

55 * @return {boolean}
56 */
57 hasLeftChild(parentIndex) {
58 return this.getLeftChildIndex(parentIndex) < this.heapContainer.length;
59 }
60
61 /**
62 * @param {number} parentIndex

Callers 2

removeMethod · 0.95
heapifyDownMethod · 0.95

Calls 1

getLeftChildIndexMethod · 0.95

Tested by

no test coverage detected