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
This is how I would do it.
Generating all permutations is a processor heavy task, so if you can cut down on your 'n' (input size), you'll gain some considerable efficiency.