Data update

This commit is contained in:
Ingy döt Net 2024-11-04 20:28:54 -08:00
parent 52a6ef48dd
commit 157b70a810
604 changed files with 14253 additions and 2100 deletions

View file

@ -1,26 +1,18 @@
import os
fn main(){
words := os.read_lines('unixdict.txt')?
words := os.read_lines('unixdict.txt')!
mut m := map[string][]string{}
mut ma := 0
for word in words {
mut letters := word.split('')
letters.sort()
sorted_word := letters.join('')
if sorted_word in m {
m[sorted_word] << word
} else {
m[sorted_word] = [word]
}
if m[sorted_word].len > ma {
ma = m[sorted_word].len
}
if sorted_word in m {m[sorted_word] << word}
else {m[sorted_word] = [word]}
if m[sorted_word].len > ma {ma = m[sorted_word].len}
}
for _, a in m {
if a.len == ma {
println(a)
}
if a.len == ma {println(a)}
}
}