[JAVA] Short and Sweet
\nclass Solution {\n    public String largestWordCount(String[] messages, String[] senders) {\n        Map<String, Integer> hm = new HashMap<>();\n        for(i
```\nclass Solution {\n    public String largestWordCount(String[] messages, String[] senders) {\n        Map<String, Integer> hm = new HashMap<>();\n        for(int i=0; i<senders.length; i++){\n            int len = messages[i].split("\\\\s+").length;\n            hm.put(senders[i], hm.getOrDefault(senders[i],0) + len);\n        }\n        \n        List<String> al = new ArrayList<>(hm.keySet());        \n        Collections.sort(al, (a, b) -> (hm.get(b) == hm.get(a)) ? b.compareTo(a) : (hm.get(b) - hm.get(a)));\n        \n        return al.get(0);\n    }\n}\n```\nTC: O(nlogn) SC: O(N)
[]