September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
|
|
@ -1,13 +1,12 @@
|
|||
fun abc(str, list):
|
||||
if list.isempty:
|
||||
fun abc(s, ls):
|
||||
if ls.isempty:
|
||||
return true
|
||||
for i in indices(list) where s[end] in list[i]:
|
||||
return abc(str[end-1:], remove(val list, i))
|
||||
return abc(s[:end-1], remove!(copy(list), at: i))
|
||||
false
|
||||
|
||||
let test = ["A", "BARK","BOOK","TREAT","COMMON","SQUAD","CONFUSE"]
|
||||
let list = ["BO","XK","DQ","CP","NA","GT","RE","TG","QD","FS",
|
||||
"JW","HU","VI","AN","OB","ER","FS","LY","PC","ZM"]
|
||||
let ls = ["BO","XK","DQ","CP","NA","GT","RE","TG","QD","FS", "JW","HU","VI","AN","OB","ER","FS","LY","PC","ZM"]
|
||||
|
||||
for str in test:
|
||||
print "$|>8|{s} | ${abc(s, list)}"
|
||||
for s in test:
|
||||
print "($|>8|{s} ${abc(s, list)})"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue