DEV Community

loading...

Discussion on: These problem-solving patterns will help you ace your next coding interview

jonrandy profile image
Jon Randy

And in Ruby:

def is_anagram(str1, str2)
  str1.split('').sort() == str2.split('').sort()
end
Enter fullscreen mode Exit fullscreen mode