Anagrams: Difference between revisions
Content deleted Content added
Line 6,381: | Line 6,381: | ||
anagram = Hash.new {|hash, key| hash[key] = []} # map sorted chars to anagrams |
anagram = Hash.new {|hash, key| hash[key] = []} # map sorted chars to anagrams |
||
open('http://wiki.puzzlers.org/pub/wordlists/unixdict.txt') do |f| |
URI.open('http://wiki.puzzlers.org/pub/wordlists/unixdict.txt') do |f| |
||
words = f.read.split |
words = f.read.split |
||
for word in words |
for word in words |