Simple || Short || Clean || Java Solution
\njava []\nclass Solution {\n    public int maximumNumberOfStringPairs(String[] words) {\n        Map<String, Integer> map = new HashMap<>();\n        for (Stri
\n```java []\nclass Solution {\n    public int maximumNumberOfStringPairs(String[] words) {\n        Map<String, Integer> map = new HashMap<>();\n        for (String s : words) {\n            String rev = new StringBuilder(s).reverse().toString();\n            if(map.containsKey(rev))    map.put(rev, map.get(rev)+1);\n            else    map.put(s,0);\n        }\n        int ans = 0;\n        for(int value : map.values())   ans += value;\n        return ans;\n    }\n}\n\n```
['Java']