RosettaCodeData/Task/ABC-Problem/Julia/abc-problem.julia

10 lines
200 B
Plaintext

function abc (str, list)
isempty(str) && return true
for i = eachindex(list)
str[end] in list[i] &&
any([abc(str[1:end-1], deleteat!(copy(list), i))]) &&
return true
end
false
end