Skip to content

Instantly share code, notes, and snippets.

1
00:01:38,246 --> 00:01:39,855
We're screwed.
2
00:01:39,956 --> 00:01:41,590
No more free Wi-Fi.
3
00:01:43,026 --> 00:01:44,026
@ewlin
ewlin / solution.js
Last active January 24, 2019 17:36
function solution(A) {
//pit is made up of [startPeak, valley, endPeak]
//set startPeak to first item in array
let startPeak = A[0];
let valley; //lowest point, the dip
let endPeak;
let i = 1;
let deepestDepth = -1;
//find the begining of the pit (if first item in array is not)