Simple Java Solution Beats 99%
\nclass Solution {\n    public String largestWordCount(String[] messages, String[] senders) \n    {\n        HashMap<String,Integer> map = new HashMap<>();\n   
```\nclass Solution {\n    public String largestWordCount(String[] messages, String[] senders) \n    {\n        HashMap<String,Integer> map = new HashMap<>();\n        String res = "";int max =0;\n        \n        for(int i=0; i<messages.length;i++)\n        {\n            int words = get_count(messages[i]);\n            \n            if(!map.containsKey(senders[i]))\n               map.put(senders[i] , words);\n               \n            else\n               map.put(senders[i],map.get(senders[i]) + words);\n        }\n        \n        for(String s: map.keySet())\n        {\n            if(map.get(s) > max)\n            {\n                res = s;\n                max = map.get(s);\n            }\n            \n            if(map.get(s) == max && res.compareTo(s) < 0)\n                res = s;\n        }\n        return res;\n    }\n    \n    private int get_count(String s)\n    {\n        int spaces = 0;\n        \n        for(int i=0; i<s.length();i++)\n        {\n            char ch = s.charAt(i);\n            if(ch == \' \')\n                spaces++;\n        }\n        return spaces+1;\n    }\n}\n```
['Counting', 'Java']