Java || Simple string solution ♨️♨️
\n\n# Code\n\nclass Solution {\n    public int maximumNumberOfStringPairs(String[] words) {\n        List<String> list = new ArrayList<>();\n        StringBuild
\n\n# Code\n```\nclass Solution {\n    public int maximumNumberOfStringPairs(String[] words) {\n        List<String> list = new ArrayList<>();\n        StringBuilder sb = new StringBuilder();\n        int count = 0;\n        for(String p : words){\n            char c[] = p.toCharArray();\n            if(c[0] != c[1]){\n                sb.append(c[1]);\n                sb.append(c[0]);\n                list.add(sb.toString());\n                sb.setLength(0);\n            }\n        }\n        List<String> list1 = new ArrayList<>();\n        for(String p : words){\n            list1.add(p);\n        }\n        for(String p : list1){\n            if(list.contains(p)){\n                list.remove(p);\n                count += 1;\n            }\n        }\n        return (count <=1)?count:count/2;\n    }\n}\n\n```
['String', 'Java']