MCPcopy Index your code
hub / github.com/TheAlgorithms/JavaScript / size

Method size

Data-Structures/Heap/BinaryHeap.js:41–43  ·  view source on GitHub ↗

* Returns the number of elements in the heap. * @returns {number} - The number of elements in the heap.

()

Source from the content-addressed store, hash-verified

39 * @returns {number} - The number of elements in the heap.
40 */
41 size() {
42 return this.heap.length
43 }
44
45 /**
46 * Checks if the heap is empty.

Callers 2

emptyMethod · 0.95
#sinkDownMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected