_siftDown(i) {
    let c;
    for (i = i || 1; (c = i << 1) <= this.n; i = c) {
      // checks which is the smaller child to compare with
      if (
        c + 1 <= this.n &&
        this._comparator.lessThan(this._elements[c + 1], this._elements[c])
      ) {
        // use the right child if it's lower than the left one
        c++;
      }
      if (this._comparator.lessThan(this._elements[i], this._elements[c])) {
        break;
      }
      this._swap(i, c);
    }
  }
Sifts down the first element
O(lg n)