code: function minRunLength(n) {
    let r = 0;
  
    while (n >= DEFAULT_MIN_MERGE) {
      r |= (n & 1);
      n >>= 1;
    }
  
    return n + r;
  }
docs: Compute minimum run length for TimSort
  
  @param {number} n - The size of the array to sort.