c++ || solution
\nclass Solution {\npublic:\n    string largestWordCount(vector<string>& msg, vector<string>& s) {\n        map<string,int> m;\n        set<string> st;\n       
```\nclass Solution {\npublic:\n    string largestWordCount(vector<string>& msg, vector<string>& s) {\n        map<string,int> m;\n        set<string> st;\n        \n        int n=s.size();\n        \n        for(int i=0;i<n;i++)\n        {\n            st.insert(s[i]);\n            int n1=msg[i].size();\n            int count=1;\n            for(int j=0;j<n1;j++)\n            {\n                if(msg[i][j]==\' \') count++;\n            }\n            m[s[i]]+=count;\n        }\n        \n        vector<string> v(st.begin(),st.end());\n        \n        reverse(v.begin(),v.end());\n        \n        n=v.size();\n        \n        string res=v[0];\n        int count=m[v[0]];\n        \n        for(int i=0;i<n;i++)\n        {\n            if(m[v[i]]>count)\n            {\n                res=v[i];\n                count=m[v[i]];\n            }\n        }\n        \n        return res;\n    }\n};\n```
[]