Skip to content

Instantly share code, notes, and snippets.

@serdardalgic
Created October 15, 2014 06:40
Show Gist options
  • Save serdardalgic/9cbd7e54e83c3c3c8403 to your computer and use it in GitHub Desktop.
Save serdardalgic/9cbd7e54e83c3c3c8403 to your computer and use it in GitHub Desktop.
Ruby monk
def number_shuffle(number)
number.to_s.split("").permutation.to_a.inject([]) {|arr, el| arr << el.join.to_i}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment