Skip to content

Instantly share code, notes, and snippets.

View fhinkel's full-sized avatar

F. Hinkelmann fhinkel

View GitHub Profile
@fhinkel
fhinkel / maxGap.js
Last active January 11, 2019 17:17
const maxGap = (arr) => {
const n = arr.length;
let min = Number.POSITIVE_INFINITY;
let max = Number.NEGATIVE_INFINITY;
for (let i = 0; i < n; i++) {
min = Math.min(arr[i], min);
max = Math.max(arr[i], max);
}
let range = max - min;
{
"metadata": {
"toolPackage": "@microsoft/api-extractor",
"toolVersion": "7.8.2-pr1796.0",
"schemaVersion": 1003,
"oldestForwardsCompatibleVersion": 1001
},
"kind": "Package",
"canonicalReference": "@google-cloud/video-intelligence!",
"docComment": "",