RosettaCodeData/Task/ABC-problem/BQN/abc-problem.bqn

17 lines
761 B
BQN
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

ABC {
Matches (¨)˜ / # blocks matching current letter
Others <˘(»`)()/¨< # blocks without current matches
𝕨(× 1˙, # if the word is empty, it can be made
Matches(× 0˙, # if no matching blocks, it cannot
´(𝕨 Others) 𝕊¨ 1< # otherwise, remove block and try remaining letters
)
) (-32×1="a{")𝕩
}
blocks"BO","XK","DQ","CP","NA","GT","RE","TG","QD","FS",
"JW","HU","VI","AN","OB","ER","FS","LY","PC","ZM"
words"A","bark","BOOK","TrEaT","Common","Squad","Confuse"
> {(<𝕩) blocks ABC 𝕩}¨ words