Concatenated Words

Hard · Trie · about 30 minutes

Asked at Amazon, Google, Meta, Apple.

Given an array of unique lowercase words, return all concatenated words: words formed entirely by at least two (not necessarily distinct) shorter words from the array. Return them in any order.

Related guides