June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
20
Task/Anagrams/BaCon/anagrams.bacon
Normal file
20
Task/Anagrams/BaCon/anagrams.bacon
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
OPTION COLLAPSE TRUE
|
||||
|
||||
DECLARE idx$ ASSOC STRING
|
||||
|
||||
FOR w$ IN LOAD$("unixdict.txt") STEP NL$
|
||||
|
||||
set$ = SORT$(EXPLODE$(w$, 1))
|
||||
|
||||
idx$(set$) = APPEND$(idx$(set$), 0, w$)
|
||||
total = AMOUNT(idx$(set$))
|
||||
|
||||
IF MaxCount < total THEN MaxCount = total
|
||||
NEXT
|
||||
|
||||
PRINT "Analyzing took ", TIMER, " msecs.", NL$
|
||||
|
||||
LOOKUP idx$ TO n$ SIZE x
|
||||
FOR y = 0 TO x-1
|
||||
IF MaxCount = AMOUNT(idx$(n$[y])) THEN PRINT n$[y], ": ", idx$(n$[y])
|
||||
NEXT
|
||||
Loading…
Add table
Add a link
Reference in a new issue