Anagrams/Deranged anagrams: Difference between revisions

→‎{{header|Go}}: small updates for library changes
m (Corrected output test)
(→‎{{header|Go}}: small updates for library changes)
Line 221:
/* read the whole thing in. how big can it be? */
buf, _ := ioutil.ReadFile("unixdict.txt")
words := strings.Split(string(buf), "\n", -1)
 
m := make(map[string] []string)
Line 231:
 
// save strings in map, with sorted string as key
letters := strings.Split(w, "", -1)
sort.SortStringsStrings(letters)
k := strings.Join(letters, "")
 
1,707

edits