7 lines
184 B
Crystal
7 lines
184 B
Crystal
|
|
ordered = File.open("unixdict.txt") do |f|
|
||
|
|
f.each_line.select {|word|
|
||
|
|
word.chars.each_cons_pair.all? {|a, b| a <= b }
|
||
|
|
}.to_a
|
||
|
|
end
|
||
|
|
puts ordered.group_by(&.size).max[1].join(" ")
|