✅Accepted || ✅Short & Simple || ✅Best Method || ✅Easy-To-Understand
\n# Code\n\nclass Solution {\npublic:\n    vector<string> findAllConcatenatedWordsInADict(vector<string>& words) {\n        unordered_set<string> st(words.begin
\n# Code\n```\nclass Solution {\npublic:\n    vector<string> findAllConcatenatedWordsInADict(vector<string>& words) {\n        unordered_set<string> st(words.begin(), words.end());\n        vector<string> ans;\n        unordered_map<string, int> mp;\n        for(string s:st)\n        mp[s]++;\n        for(string s:st)\n        {\n            int n=s.size();\n            vector<bool> dp(n+1);\n            dp[0]=true;\n            for(int i=1;i<=n;i++)\n            {\n                for(int j=0;j<i;j++)\n                {\n                    if(dp[j])\n                    {\n                        string sub=s.substr(j, i-j);\n                        if(mp.find(sub)!=mp.end() && sub!=s)\n                        {\n                            dp[i]=true;\n                            break;\n                        }\n                    }\n                }\n                if(dp[n])\n                ans.push_back(s);\n            }\n        }\n        return ans;\n    }\n};\n```\nPlease **UPVOTE** if it helps \u2764\uFE0F\uD83D\uDE0A\nThank You and Happy To Help You!!
['C++']