Skip to content

Instantly share code, notes, and snippets.

Created January 26, 2015 13:46
Show Gist options
  • Save anonymous/5401b3faf1c438ada7d7 to your computer and use it in GitHub Desktop.
Save anonymous/5401b3faf1c438ada7d7 to your computer and use it in GitHub Desktop.
Ruby gist perm
a = []
1.upto(9) do |t|
a.push(t)
end
a = a.permutation.to_a.reverse
nums =[]
for i in 0..a.length
num = a[i].map(&:to_s).join.to_i
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment