Skip to content

Instantly share code, notes, and snippets.

@e-mihaylin
Created October 3, 2018 11:32
Show Gist options
  • Save e-mihaylin/2b421acf66c3b06642065806bbf57f22 to your computer and use it in GitHub Desktop.
Save e-mihaylin/2b421acf66c3b06642065806bbf57f22 to your computer and use it in GitHub Desktop.
const longestSlideDown = p => p.reduceRight((x, e) => e.map((v, i) => v + Math.max(x[i], x[i + 1])))[0];
// https://www.codewars.com/kata/551f23362ff852e2ab000037
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment