JavaScript simple solution with explanation
Approach\n\n1. Initialize maxPairs to keep track of the maximum number of pairs\n2. Initialize wordSet to track words that can potentially form pairs\n3. Iterat
# Approach\n\n1. Initialize `maxPairs` to keep track of the maximum number of pairs\n2. Initialize `wordSet` to track words that can potentially form pairs\n3. Iterate through the words:\n    - sort the word lexicographically\n    - checks if it is in `wordSet`\n    - if found, a pair is formed, increment `maxPairs` and remove the word from the set\n    - otherwise, add the word to the set\n4. Return `maxPairs`\n\n# Complexity\n\n- Time Complexity: `O(n)` - It iterates through the array once.\n- Space Complexity: `O(n)` - In the worst case, all words could be added to the set.\n\n# Code\n```\n/**\n * @param {string[]} words\n * @return {number}\n */\nconst maximumNumberOfStringPairs = function (words) {\n  let maxPairs = 0;\n  const wordSet = new Set();\n\n  for (let i = 0; i < words.length; i++) {\n    const w = words[i][0] > words[i][1] \n      ? words[i][1] + words[i][0] \n      : words[i];\n\n    if (wordSet.has(w)) {\n      maxPairs++;\n      wordSet.delete(w);\n    } else {\n      wordSet.add(w);\n    }\n  }\n  return maxPairs;\n};\n```
['JavaScript']