Simple answer using HashSet
Complexity
Time complexity: O(n.m)
(n for loop and m for reverse)

Space complexity: O(n+m)
(n for Set and m for StringBuilder)
Code

<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity: ***O(n.m)***
(n for loop and m for reverse) 
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: ***O(n+m)***
(n for Set and m for StringBuilder)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
    public int maximumNumberOfStringPairs(String[] words) {
        int count = 0;
        Set<String> set = new HashSet<>();
        
        for(String word: words){
            String rev = new StringBuilder(word).reverse().toString();

            if(set.contains(rev)){
                count++;
            }
            set.add(word);
        }
        return count;
    }
}
```
['Array', 'String', 'Java']