simple efficient solution
\nclass Solution {\n#define ln ListNode\n#define tn TreeNode\n#define endl \'\\n\'\n    typedef long long ll;\n    typedef vector<ll> vi;\n    const ll mod = 1e
```\nclass Solution {\n#define ln ListNode\n#define tn TreeNode\n#define endl \'\\n\'\n    typedef long long ll;\n    typedef vector<ll> vi;\n    const ll mod = 1e9;\npublic:\n    string largestWordCount(vector<string>& m, vector<string>& s) {\n        ll sz = m.size();\n        unordered_map<string, ll>ump;\n        for (ll i = 0;i < sz;++i) {\n            string& snd = s[i];\n            ll cnt = 1;\n            for (char& ch : m[i])\n                if (ch == \' \')\n                    cnt++;\n            ump[snd] += cnt;\n        }\n        string snd="";\n        for (auto& it : ump) {\n            if (snd.empty() || it.second > ump[snd] || (it.second == ump[snd] && it.first > snd))\n                snd = it.first;\n        }\n        return snd;\n    }\n};\n```
[]