💡JavaScript Solution
The idea\n1. Sort the array by length\n2. Use dynamic programming (bottom up) to check whether array[0,i-1] is a concatenated word\n3. Build the dp array as we 
### The idea\n1. Sort the array by length\n2. Use dynamic programming (bottom up) to check whether array[0,i-1] is a concatenated word\n3. Build the dp array as we iterate through the word from left to right using `end` pointer. Iterate array[0, end-1] use another point `start`. This way, we essentially split the question into 2 parts, array[0,start-1] (which is just dp[start])and array[start, end-1].\n``` javascript\nvar findAllConcatenatedWordsInADict = function(words) {\n    words.sort((a,b)=>a.length-b.length);\n    let wordList = new Set();\n    let allConcat = [];\n    let isConcat = function(word) {\n        if (!word) return false;\n        let dp = new Array(word.length+1).fill(false);\n        dp[0] = true;\n        for (let end=1;end<=word.length;end++) {\n            for (let start=0;start<end;start++) {\n                if (dp[start] && wordList.has(word.slice(start, end))) {\n                    dp[end] = true;\n                    break;\n                }\n            }\n        }\n        return dp.pop();\n    }\n\n    for (let i=0;i<words.length;i++) {\n        if(isConcat(words[i])) {\n            allConcat.push(words[i]);\n        }\n        wordList.add(words[i]);\n    }\n    return allConcat;\n};\n```
['JavaScript']