Simple DFS || No Trie || No DP || Easy to understand
\nclass Solution {\npublic:\n    int solve(set<string>&st, string& word, int start)\n    {\n        if (start >= word.size()) return 0;\n\n        string strTil
```\nclass Solution {\npublic:\n    int solve(set<string>&st, string& word, int start)\n    {\n        if (start >= word.size()) return 0;\n\n        string strTillPivot = "";\n        int mx = INT_MIN;\n        for (int pivotIdx = start; pivotIdx < word.size(); pivotIdx++)\n        {\n            strTillPivot.push_back(word[pivotIdx]);\n            if (st.find(strTillPivot) == st.end()) continue;\n            \n            int nextPartitionCount = solve(st, word, pivotIdx + 1);\n            if (nextPartitionCount == INT_MIN) continue;\n\t\t\t//INT_MIN defines that the nextString cannot form a valid partition\n\t\t\t\n            int totalPartitions = 1 + nextPartitionCount;\n            mx = max(mx, totalPartitions);\n        }\n        return mx;\n    }\n    vector<string> findAllConcatenatedWordsInADict(vector<string>& words) \n    {\n        set<string>st;\n        for (string& word : words) st.insert(word);\n        vector<string>ans;\n        for (string word : words)\n        {\n            int partitionCount = solve(st, word, 0);\n            if (partitionCount >= 2) ans.push_back(word); //If we can partition the word in >=2 parts\n        }\n        return ans;\n        \n    }\n};\n```
['Depth-First Search', 'C', 'C++']