Skip to content

Instantly share code, notes, and snippets.

@hannu
Created September 4, 2013 07:00
Show Gist options
  • Save hannu/6433554 to your computer and use it in GitHub Desktop.
Save hannu/6433554 to your computer and use it in GitHub Desktop.
Max product of number sequence solution
function(input) {
var i=0; return _.max(_.map(input, function() {return _.reduce(input.substring(i++,i+4), function(o,m) {return o*m;})}))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment