Skip to content

Instantly share code, notes, and snippets.

@l0gicpath
Last active August 29, 2015 13:56
Show Gist options
  • Save l0gicpath/8994339 to your computer and use it in GitHub Desktop.
Save l0gicpath/8994339 to your computer and use it in GitHub Desktop.
Project Euler problem #4 solution in Ruby
(100..999).to_a.repeated_permutation(2).collect{|x| x[0] * x[1] if "#{x[0] * x[1]}" == "#{x[0] * x[1]}".reverse }.compact.max
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment