[JAVA] easy solution without StringBuilder/Map
Intuition\n Describe your first thoughts on how to solve this problem. \nIn the entire array words count the number of times a word and its reverse is present i
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nIn the entire array words count the number of times a word and its reverse is present in the array\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nfor all the words check if the first letter of a word equals the second letter of another word in the array `words`  and vice versa\n\n# Complexity\n- Time complexity: O(n * n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int maximumNumberOfStringPairs(String[] words) {\n      int ans = 0;\n      for (int i = 0; i < words.length; i ++) {\n          for(int j = i + 1; j < words.length; j ++) \n              if(words[i].charAt(0) == words[j].charAt(1) && words[i].charAt(1) == words[j].charAt(0))\n              ans ++;\n      }  \n      return ans;\n    }\n}\n```
['Array', 'String', 'Simulation', 'Java']