Easy Sol
\n\n# Complexity\n- Time complexity: O(n) \n\n- Space complexity:\n Add your space complexity here, e.g. O(n) \n\n# Code\ncpp []\nclass Solution {\npublic:\n   
\n\n# Complexity\n- Time complexity: $$O(n)$$ \n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int numOfPairs(vector<string>& nums, string target) {\n        map<string,int>mp;\n        mp[""]=0;\n        for(int i=0;i<nums.size();i++){\n            mp[nums[i]]++;\n        }\n        int count=0;\n        string s,p;\n        for(int i=0;i<nums.size();i++){\n            if(nums[i].size()>=target.size())continue;\n            p=target.substr(0,nums[i].size());\n            if(p==nums[i]){\n            s=target.substr(nums[i].size(),target.size()-nums[i].size());\n            if(mp.find(s)!=mp.end()){\n                if(nums[i]==s)count+=mp[s]-1;\n                else count+=mp[s];\n            }}\n        }\n        return count;\n    }\n};\n```
['C++']