Finding Maximum Number of String Pairs
Intuition\n Describe your first thoughts on how to solve this problem. \nWHEN I SEE THIS PROBLEM: Find Maximum Number of (String Pairs)\n\n\n\n# Code\n\n\nclass
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nWHEN I SEE THIS PROBLEM: Find Maximum Number of (String Pairs)\n![image.png](https://assets.leetcode.com/users/images/da4fa02d-8240-425d-9ee7-93b95966a1ed_1692186832.7186623.png)\n\n\n# Code\n```\n\nclass Solution {\n    public int maximumNumberOfStringPairs(String[] words) {\n        ArrayList<String> obj=new  ArrayList<String>();\n        Collections.addAll(obj,words);\n        int count=0;\n        for(int i=0;i<words.length;i++){\n            String str=words[i];\n            int n=str.length();\n            String ktr="";\n            //REVERSE\n            for(int k=0;k<n;k++){\n                ktr=str.charAt(k)+ktr;\n            }\n            //REMOVE ELEMENTS LIKE "ZZ","aa"\n            if(ktr.equals(str)){\n                 obj.remove(ktr);\n            }\n             //REMOVE ELEMENTS IF PRESENT IN ARRAY LIST\n            if(obj.contains(ktr)){\n                obj.remove(str); \n                count++;\n            }\n            \n         \n          \n        }\n        \n        return count;\n    }\n} \n```
['Array', 'Java']