Skip to content

Instantly share code, notes, and snippets.

@pdamer
Created November 4, 2015 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdamer/115748a5edd9634af584 to your computer and use it in GitHub Desktop.
Save pdamer/115748a5edd9634af584 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
File.foreach(ARGV[0], sep="\n") do |input|
puts input.chomp.chars.permutation.map(&:join).sort.uniq.join(',')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment