Skip to content

Instantly share code, notes, and snippets.

@aarti
Created December 26, 2013 05:33
Show Gist options
  • Save aarti/8130143 to your computer and use it in GitHub Desktop.
Save aarti/8130143 to your computer and use it in GitHub Desktop.
Alphagram: An alphagram of a word (or of any group of letters) consists of the word's letters arranged in alphabetical order
irb(main):016:0> a = "aartiparikh"
=> "aartiparikh"
irb(main):022:0> a.split("").sort.join("")
=> "aaahiikprrt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment