* Returns the number of elements in the heap. * @returns {number} - The number of elements in the heap.
()
| 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. |