Maps cpp solve✅✅ Map+Recursive Solve
Intuition\n Describe your first thoughts on how to solve this problem. \nMap stores the words \n# Approach\n Describe your approach to solving the problem. \nre
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nMap stores the words \n# Approach\n<!-- Describe your approach to solving the problem. -->\nrecursive approaches\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    bool solve(string s,vector<string>& words,map<string,int>& mapp,string r,int vals){\n        if(s.size()==0&&vals>=2)\n        {\n            return true;\n        }\n        else if(s.size()==0)\n        return false;\n        for(int p=1;p<=s.size();p++){\n            if(mapp.count(s.substr(0,p))>0){\n            if(solve(s.substr(p),words,mapp,r,vals+1))\n        {return true;}\n        }}\n   return  false;}\n    vector<string> findAllConcatenatedWordsInADict(vector<string>& words) {\n       vector<string> sols;\n       map<string,int> mapp;\n       for(int p=0;p<words.size();p++){\n           mapp[words[p]]++;\n       }\n       for(int po=0;po<words.size();po++){\n       if(solve(words[po],words,mapp,"",0))\n       sols.push_back(words[po]);\n       }\n        return sols;\n    }\n};\n```
['Ordered Map', 'C++']