C++ Soln || Trie + DFS
\nclass Solution {\npublic:\n    struct trie{\n        trie* child[26];\n        bool isend;\n    };\n    trie* root;\n    trie* getnode(){\n        trie* node=
```\nclass Solution {\npublic:\n    struct trie{\n        trie* child[26];\n        bool isend;\n    };\n    trie* root;\n    trie* getnode(){\n        trie* node=new trie;\n        for(int i=0;i<26;i++){\n            node->child[i]=NULL;\n        }\n        node->isend=false;\n        return node;\n    }\n    void addword(string s){\n        trie *cur=root;\n        for(int i=0;i<s.length();i++){\n            if(!cur->child[s[i]-\'a\'])cur->child[s[i]-\'a\']=getnode();\n            cur=cur->child[s[i]-\'a\'];\n        }\n        cur->isend=true;\n    }\n    bool search(string w) {\n        trie* cur=root;\n        for(int i=0;i<w.length();i++){\n            if(!cur->child[w[i]-\'a\'])return false;\n            cur=cur->child[w[i]-\'a\'];\n        }\n        return (cur!=NULL && cur->isend);\n    }\n    vector<string> res;\n    bool sol(string word, int count){\n        if(count>1 && search(word))return true;\n        for(int j=0;j<word.length()-1;j++){\n            string left=word.substr(0,j+1);\n            string right=word.substr(j+1);\n            if(search(left) && sol(right, count+1)) return true;\n            \n        }\n        return false;\n    }\n    \n    vector<string> findAllConcatenatedWordsInADict(vector<string>& words) {\n        root=getnode();\n        bool flag=false;\n        vector<string> ans;\n        for(int i=0;i<words.size();i++){\n            if(words[i]=="")continue;\n            addword(words[i]);\n            \n        }\n        for(auto &w:words){\n            if(w=="")continue;\n            if(sol(w,1))ans.push_back(w);\n        }\n        return ans;\n        \n    }\n};\n```
['Depth-First Search', 'Trie', 'C']