JAVA || HASHMAP || ONE PASS || COUNT SPACE +1
\nclass Solution {\n    public String largestWordCount(String[] messages, String[] senders) \n    {\n        int n=messages.length;\n        \n        String an
```\nclass Solution {\n    public String largestWordCount(String[] messages, String[] senders) \n    {\n        int n=messages.length;\n        \n        String ans="";\n        int max=0;\n        Map<String,Integer> map=new HashMap<>();\n        \n        for(int i=0;i<n;i++)\n        {\n            int c=0;\n            for(int j=0;j<messages[i].length();j++)\n            {\n                if(messages[i].charAt(j)==\' \')\n                c++;\n            }\n            \n            c++;\n            map.put(senders[i],map.getOrDefault(senders[i],0)+c);\n            \n            int x=map.get(senders[i]);\n            \n            if(x<max)\n            continue;\n            \n            if(x==max)\n            ans=senders[i].compareTo(ans)>0?senders[i]:ans;\n            \n            else\n            {\n                max=x;\n                ans=senders[i];\n            }\n        }\n        \n        return ans;\n    }\n}\n```
['String', 'Java']