code: function median(input) {
                  if (!Array.isArray(input)) {
                      throw new Error('input must be an array');
                  }
  
                  if (input.length === 0) {
                      throw new Error('input must not be empty');
                  }
  
                  return medianQuickselect_min(input.slice());
              }
docs: Computes the median of the given values
  @param {Array<number>} input
  @return {number}