I am wanting to write a anagram type solver in Ruby but it will work against a list of words, like so.
List of words is:
the
these
one
owner
I would allow the user to input some letters, e.g noe, and it would search the word list for words that it can make using the letters the user has input and would bring back one
and if they entered "eth" or even "the" it would bring back the
. I have been trying to think of a efficient way to do this but I have been looping around each word, match a letter in the word, checking the word for each letter and both lengths match. Can anyone give advice of a better and more efficient way to do this?