greatestLowerBound(t: number): number {
    if (t < 0) {
      return -1;
    }

    let node = 1;
    if (this._heap[node] <= t) {
      return this._size;
    }

    while (node < this._half) {
      const leftSum = this._heap[2 * node];
      if (t < leftSum) {
        node = 2 * node;
      } else {
        node = 2 * node + 1;
        t -= leftSum;
      }
    }

    return node - this._half;
  }
Returns the smallest i such that 0 <= i <= size and sumUntil(i) <= t, or
-1 if no such i exists.