lowerBound = (sortedArray, element) => {
  let lo = 0;
  let hi = sortedArray.length - 1;

  while (lo <= hi) {
    const mid = ((hi - lo) >> 1) + lo;
    if (sortedArray[mid] > element) {
      hi = mid - 1;
    } else {
      lo = mid + 1;
    }
  }

  return lo;
}
lowerBound returns index of the first element greater than the search key
in logarithmic time (O(log n))

@param Array
@param Number|String

@return Number