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

Method hasRightChild

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

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

(parentIndex)

Source from the content-addressed store, hash-verified

63 * @return {boolean}
64 */
65 hasRightChild(parentIndex) {
66 return this.getRightChildIndex(parentIndex) < this.heapContainer.length;
67 }
68
69 /**
70 * @param {number} parentIndex

Callers 1

heapifyDownMethod · 0.95

Calls 1

getRightChildIndexMethod · 0.95

Tested by

no test coverage detected