Simple hashing c++
\nclass Solution {\npublic:\n     bool matchString(string a,string b){\n        int size1 = a.size();\n        int size2 = b.size();\n        int i=0,j=0;\n    
```\nclass Solution {\npublic:\n     bool matchString(string a,string b){\n        int size1 = a.size();\n        int size2 = b.size();\n        int i=0,j=0;\n        for(i=0,j=0; i<size1 && j < size2 ;i++){\n            if(a[i]==b[j]){\n                 j++;\n            }\n        }\n        return j==size2;\n    }\n    int numMatchingSubseq(string s, vector<string>& words) {\n        int n=words.size();\n        unordered_map<string,int>mp;\n        int ans=0;\n        for(auto& x:words){\n            if(mp.find(x)!=mp.end()) ans+=mp[x];\n            else {\n                mp[x]=matchString(s,x);\n                ans+=mp[x];\n            }\n        }\n        \n        return ans;\n    }\n};\n```
['C']