On 08/12/05, travis laduke <wrong / socal.rr.com> wrote: > it seems to me, with computers these days, this should finish > instantly, not take like 20 seconds. > also, please help me make my ruby more ruby-like. i'm new to ruby, > not that i know any other language. > > [snip] if you want to find lots of anagrams against the same database it would make sense to create an index. Make a hash that is indexed by the sorted letters and let it point to a list of words that yield this letter. After you have done this once, you can lookup anagrams in O(1) cheers, Brian -- http://ruby.brian-schroeder.de/ Stringed instrument chords: http://chordlist.brian-schroeder.de/