Brute force + O(n) Hashmap solution
Brute Force\nSimple brute force method by computing the reverse of every single word and looking ahead the rest of the words to see if any of those match. This 
### Brute Force\nSimple brute force method by computing the reverse of every single word and looking ahead the rest of the words to see if any of those match. This has a TC of O(n^2) where n is the number of elements in `words`, and a SC of O(1).\n\n```typescript\nfunction maximumNumberOfStringPairs(words: string[]): number {\n  let pairs = 0;\n\n  for (let i = 0; i < words.length; i++) {\n    const reversedWord = words[i].split("").reverse().join("");\n\n    for (let j = i + 1; j < words.length; j++) {\n      console.log("object", reversedWord, words[j]);\n\n      if (words[j] === reversedWord) {\n        pairs++;\n        break;\n      }\n    }\n  }\n\n  return pairs;\n}\n```\n\n### Efficient hashmap solution\nThis is a more efficient solution using a "Hashmap" or Set in this case, so that the loop only run once as we "remember" what was already seen before.\n\nThis has a TC and SC of O(n) where n is the number of elements in `words`.\n\n```typescript\nfunction maximumNumberOfStringPairs(words: string[]): number {\n  let pairs = 0;\n  const set: Set<string> = new Set();\n\n  for (let i = 0; i < words.length; i++) {\n    // If the set already contains the current word, it means a pair is found!\n    if (set.has(words[i])) {\n      pairs++;\n      continue;\n    }\n\n    // Else, reverse the current word and add it to the set\n    set.add(words[i].split("").reverse().join(""));\n  }\n\n  return pairs;\n}\n```
['Array', 'Hash Table', 'Simulation', 'TypeScript']