[2 approaches][1st is using stringstream][c++]
\n1.Runtime: 4 ms, faster than 83.76% using stringstream\n\n          class Solution {\n        public:\n            vector uncommonFromSentences(string A, stri
\n1.Runtime: 4 ms, faster than 83.76% using stringstream\n\n          class Solution {\n        public:\n            vector<string> uncommonFromSentences(string A, string B) {\n                unordered_map<string, int> m;\n\t\t\t\t// breaking input into word using string stream \n\t\t\t\t//A stringstream associates a string object with a stream allowing you to read from the string as if it were a stream (like cin).\n                stringstream sa(A);  // Used for breaking into words\n                stringstream sb(B);\n        \n                string wa;  // to store individual words of string A\n                string wb; // to store individual words of string B\n        \n\t\t        // each word wa mapped to it\'s frequency \n                while(sa>>wa){\n                    m[wa]+=1;    \n                }\n        \n\t\t          // each word wb mapped to it\'s frequency \n                while(sb>>wb){\n                    m[wb]+=1;\n                }\n                vector<string> res;\n                for(auto it:m){\n                    if(it.second==1){\n                        res.push_back(it.first);\n                    }\n                }\n                return res;\n            }\n        };\n\t\t\n2.Runtime: 0 ms, faster than 100.00% using string\n\n       class Solution {\n       public:\n           vector<string> uncommonFromSentences(string A, string B) {\n               unordered_map<string,int> hmap(0);\n               A = A+" "+B+" "; //adding string B in string A\n               string s = "";\n               for(char c : A){\n                   if(c!=\' \')\n                       s.push_back(c);\n                   else{\n                       hmap[s]++;\n                       s = "";\n                   }\n               }\n               vector<string> res;\n               for(auto it : hmap){\n                   if(it.second == 1){\n                       res.push_back(it.first);\n                   }\n               }\n               return res;\n           }\n       };\n**Feel free to ask any question in the comment section.\nIf you like this solution, do UPVOTE.\nHappy Coding :)**\n\t\t
['C', 'C++']