Python3 - O(n) Solution made easy.
\nclass Solution:\n    def numOfPairs(self, nums: List[str], target: str) -> int:\n        container, res = {}, 0\n        tlen = len(target)\n        for i in 
```\nclass Solution:\n    def numOfPairs(self, nums: List[str], target: str) -> int:\n        container, res = {}, 0\n        tlen = len(target)\n        for i in range(len(nums)):\n            ilen = len(nums[i])\n            if target[:ilen] == nums[i] and target[ilen:] in container:\n                res += container[target[ilen:]]\n            if target[tlen - ilen:] == nums[i] and target[:tlen - ilen] in container:\n                res += container[target[:tlen - ilen]]\n            container[nums[i]] = container.get(nums[i], 0) + 1\n        \n        return res\n```
[]