* @param {*} item * @param {Comparator} [comparator] * @return {Number[]}
(item, comparator = this.compare)
| 192 | * @return {Number[]} |
| 193 | */ |
| 194 | find(item, comparator = this.compare) { |
| 195 | const foundItemIndices = []; |
| 196 | |
| 197 | for (let itemIndex = 0; itemIndex < this.heapContainer.length; itemIndex += 1) { |
| 198 | if (comparator.equal(item, this.heapContainer[itemIndex])) { |
| 199 | foundItemIndices.push(itemIndex); |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | return foundItemIndices; |
| 204 | } |
| 205 | |
| 206 | /** |
| 207 | * @return {boolean} |
no test coverage detected