I approached the trouble by applying a trie and carrying out a depth-initial search. Here's the code:
specified an array of strings words and phrases (with no more info duplicates), return many of the concatenated terms while in the supplied listing of
A concatenated word is described for a string which is comprised totally of not less than two shorter terms (not necesssarily distinct) from the offered array.