C++ solution | faster than 100% | unordered map
\nclass Solution {\npublic:\n    void uncommon(string s,unordered_map<string,int>&mp) {\n        string word="";\n        for(int i=0; i<s.size(); i++) {\n     
```\nclass Solution {\npublic:\n    void uncommon(string s,unordered_map<string,int>&mp) {\n        string word="";\n        for(int i=0; i<s.size(); i++) {\n                if(s[i]==\' \') {\n                     mp[word]++;\n                     word="";\n                }else {\n                     word+=s[i];\n                }\n        }\n        mp[word]++;\n    }\n    vector<string> uncommonFromSentences(string s1, string s2) {\n        vector<string> ans;\n        unordered_map<string,int> mp;\n        uncommon(s1,mp);\n        uncommon(s2,mp);\n        for(pair<string,int> p : mp) {\n            if(p.second==1) ans.push_back(p.first);\n        }\n        return ans;\n    }\n};\n```
['String', 'C']