java easy solution using hashmap
\nclass Solution {\n    public String largestWordCount(String[] messages, String[] senders) {\n        HashMap<String,Integer> map=new HashMap();\n        Strin
```\nclass Solution {\n    public String largestWordCount(String[] messages, String[] senders) {\n        HashMap<String,Integer> map=new HashMap();\n        String name=senders[0];\n        int max=Integer.MIN_VALUE;\n        for(int i=0;i<senders.length;i++)\n        {\n            String[] arr=messages[i].split(" ");\n            map.put(senders[i],map.getOrDefault(senders[i],0)+arr.length);\n            if(max==map.get(senders[i]) && senders[i].compareTo(name)>=0)\n            {\n                name=senders[i];\n            }\n            else if(max<map.get(senders[i]))\n            {\n                max=map.get(senders[i]);\n                name=senders[i];\n            }\n        }\n        return name;\n        \n    }\n}\n```
['Java']