C++  Easy solution
\nclass Solution {\npublic:\n    int numOfPairs(vector<string>& nums, string target) {\n        unordered_map<string,int>mp;\n        int n=nums.size();\n      
```\nclass Solution {\npublic:\n    int numOfPairs(vector<string>& nums, string target) {\n        unordered_map<string,int>mp;\n        int n=nums.size();\n        \n        for(int i=0;i<n;i++){\n            mp[nums[i]]++;\n        }\n        \n        int ans=0;\n        string start="", end="";\n        \n        for(int i=0;i<target.size()-1;i++){\n            start+=target[i];\n            end=target.substr(i+1,target.size()-i-1);\n            \n            if(start!=end)\n            ans+=mp[start]*mp[end];\n            else\n            ans+=(mp[start]*(mp[start]-1));\n        }\n        \n        return ans;\n        \n    }\n};\n```
['Array', 'C']