I approached the situation by applying a trie and accomplishing a depth-very first search. Here is the code:
provided an variety of strings words (with out duplicates), return all the concatenated phrases in the offered more info listing of
A concatenated term is outlined being a string that is certainly comprised entirely of no less than two shorter text (not necesssarily unique) within the specified array.