C++ (Another std::stringstream application)
Some other questions that can be solved easily using std::stringstream :\nLeetcode - 151  : Reverse Words in a String\nLeetcode - 186  : Reverse Words in a Stri
Some other questions that can be solved easily using std::stringstream :\nLeetcode - 151  : Reverse Words in a String\nLeetcode - 186  : Reverse Words in a String II\nLeetcode - 557  : Reverse Words in a String III\nLeetcode - 1108 : Defanging an IP Address\nLeetcode - 1816 : Truncate Sentence\n```\nclass Solution {\npublic:\n    vector<string> uncommonFromSentences(string s1, string s2) {\n        unordered_map<string, int> mp;\n        \n        stringstream ss1(s1);\n        string token = "";\n        \n        while(ss1 >> token) mp[token]++;\n        \n        stringstream ss2(s2);\n        token = "";\n        \n        while(ss2 >> token) mp[token]++;\n        \n        vector<string> result;\n        for(auto &it : mp) {\n            if(it.second == 1)\n                result.push_back(it.first);\n        }\n        \n        return result;\n    }\n};\n```
[]