SIMPLEST BRUTEFORCE SOLUTION ;)
\n# Complexity\n- Time complexity:\nO(n^2)\n\n- Space complexity:\nO(1)\n\n# Code\n\nclass Solution {\npublic:\n    int numOfPairs(vector<string>& nums, string 
\n# Complexity\n- Time complexity:\nO(n^2)\n\n- Space complexity:\nO(1)\n\n# Code\n```\nclass Solution {\npublic:\n    int numOfPairs(vector<string>& nums, string target) {\n        int c=0;\n        for(int i=0;i<nums.size();i++)\n        {\n            for(int j=0;j<nums.size();j++)\n            {\n                if(i==j)continue;\n                string temp=nums[i]+nums[j];\n                if(temp==target)\n                c++;\n            }\n        }\n    return c;\n    }\n};\n```
['C++']