Skip to content

Instantly share code, notes, and snippets.

@lyntco
Last active August 29, 2015 14:07
Show Gist options
  • Save lyntco/b7ad10532ecc599245c0 to your computer and use it in GitHub Desktop.
Save lyntco/b7ad10532ecc599245c0 to your computer and use it in GitHub Desktop.
Quiz-8 Anagram Detector

Quiz-8 Anagram Detector

Write a program that, given a word and a list of possible anagrams, selects the correct one(s).

In other words, given: "listen" and %w(enlists google inlets banana) the program should return "inlets".

Run it like so:

find_anagram("listen", %w(enlists google inlets banana))
# => "Inlets is the Anagram for Listen"
find_anagram("monkey", %w(enlists google inlets banana))
# => "Monkey is not found"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment