Skip to main content
Module

x/simplestatistic/src/min_sorted.js>default

simple statistics for node & browser javascript
function default
import { default } from "https://deno.land/x/simplestatistic@v7.7.1/src/min_sorted.js";

The minimum is the lowest number in the array. With a sorted array, the first element in the array is always the smallest, so this calculation can be done in one step, or constant time.

Examples

minSorted([-100, -10, 1, 2, 5]); // => -100

Parameters

x

input