docs: function siftUp(arr, comp, pos, sym) {
    const elem = arr[pos];
    while(pos > 0) {
      const parentPos = (pos - 1) >> 1;
      const parent = arr[parentPos];
      if (pos > 0 && comp(elem, parent) > 0) {
        arr[pos] = parent;
        updateIndexAt(arr, pos, sym);
        pos = parentPos;
      } else {
        break;
      }
    }
    arr[pos] = elem;
    updateIndexAt(arr, pos, sym);
    return arr;
  }