Skip to content

Instantly share code, notes, and snippets.

@terotil
Created September 4, 2013 09:05
Show Gist options
  • Save terotil/6434553 to your computer and use it in GitHub Desktop.
Save terotil/6434553 to your computer and use it in GitHub Desktop.
def fast_track(input)
input.
each_char.
map(&:to_i).
each_cons(5).
map { |consequtive_5| consequtive_5.reduce(:*) }.
max
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment