You are given a string and an array of strings. How to quickly check, if this string can be built by concatenating some of the strings in the array?
This is a theoretica
It's definitely not quick but you here's an idea:
Stop when you're left with a 0 length target string.
As I said before, this is definitely not fast but should give you a baseline ("it shouldn't get much worse than this").
EDIT
As pointed out in the comments, this will not work. You will have to store the partial matches and fall back on them when you find there is no way further.
This way, eventually you'll explore the entire space of solutions. For every candidate head you'll try every possible tail.