Skip to main content
Module

x/statistics/mod.ts>max

Deno basic statistics module.
Latest
function max
import { max } from "https://deno.land/x/statistics@v0.1.1/mod.ts";

This computes the maximum number in an array.

This runs on O(n), linear time in respect to the array

Examples

max([1, 2, 3, 4]); // => 4

Parameters

x: number[]

sample of one or more data points

Returns

number

maximum value