Skip to content

Instantly share code, notes, and snippets.

@cjbottaro
Last active August 29, 2015 14:14
Show Gist options
  • Save cjbottaro/19b5919cca4cdbec5830 to your computer and use it in GitHub Desktop.
Save cjbottaro/19b5919cca4cdbec5830 to your computer and use it in GitHub Desktop.
Anagram detector in Ruby
def anagram?(s1, s2)
s1.downcase.chars.sort == s2.downcase.chars.sort
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment