C++ || EASY TO UNDERSTAND || Simple BackTracking Siolution
\nclass Solution {\npublic:\n    set<string> dict;\n    bool check(string &word,int c)\n    {\n        if(word.size()==0)\n        {\n            // cout<<c<<en
```\nclass Solution {\npublic:\n    set<string> dict;\n    bool check(string &word,int c)\n    {\n        if(word.size()==0)\n        {\n            // cout<<c<<endl;\n            if(c>=2)\n            return true;\n            \n            return false;\n        }\n\n        for(int i=1;i<=word.size();i++)\n        {\n            string left=word.substr(0,i);\n            string right=word.substr(i);\n            if(dict.find(left)!=dict.end())\n            {\n                ++c;\n                if(check(right,c))\n                {\n                    return true;\n                }\n                --c;\n            }\n        }\n        return false;\n    }\n    vector<string> findAllConcatenatedWordsInADict(vector<string>& words) {\n        vector<string> ans;\n        for(auto &word:words)\n        {\n            dict.insert(word);\n        }\n        for(auto &word:words)\n        {\n            if(check(word,0))\n            {\n                ans.push_back(word);\n            }\n        }\n        return ans;\n    }\n};\n```\n**Please upvote to motivate me in my quest of documenting all leetcode solutions. HAPPY CODING:)\nAny suggestions and improvements are always welcome**\n
[]