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

Method empty

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

* Checks if the heap is empty. * @returns {boolean} - True if the heap is empty, false otherwise.

()

Source from the content-addressed store, hash-verified

47 * @returns {boolean} - True if the heap is empty, false otherwise.
48 */
49 empty() {
50 return this.size() === 0
51 }
52
53 /**
54 * Bubbles up a value from the specified index to maintain the heap property.

Callers 2

extractTopMethod · 0.95
BinaryHeap.test.jsFile · 0.80

Calls 1

sizeMethod · 0.95

Tested by

no test coverage detected