easy solution using hashmap
Intuition\n Describe your first thoughts on how to solve this problem. \nsee we will first map all the characters of the string s and store it in map with char 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nsee we will first map all the characters of the string s and store it in map with char as value and its index as key. so, let s = "abcde".\na->0\nb->1\nc->2\nd->3\ne->4.\nNow we iterate thorugh each word of the vector words and check if the all the characters  of a particular string is present in the mp if all the characters are present then increment the count.\n\ntake an example\nlet s = "abcacadbba"\nwords = [ "acca","cdaa","bcca"]\nnow in the map insert the s\na-> 0,3,5,9\nb-> 1,7,8\nc-> 2,4\nd-> 6\n\nnow take curr = words[i]\nnow search for every char. of curr, in the map and if all the char are present in the map, then inc. the count.\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(n*logn)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(n)\n\n# Code\n```\nclass Solution {\npublic:\n    int numMatchingSubseq(string s, vector<string>& words) {\n        // first store char of the s and their respective index in map\n        unordered_map<char,vector<int>> mp;\n        int k=0; // for index\n        for(auto it:s) \n            mp[it].push_back(k++);\n\n        int count = 0;\n        for(int i=0;i<words.size();++i){\n            string curr = words[i];\n            //we need to consider the char after the curr index\n            int latest =-1;\n            for(int j=0;j<curr.size();++j){\n                // first we need to find the current char in the map and get its index\n                // for a particular char in the mp, we have a vector, so we need to iterate through the vector\n                auto it = upper_bound(mp[curr[j]].begin(),mp[curr[j]].end(),latest);\n                if(it == mp[curr[j]].end()) break; //if we dont find the char after the lastet value, we break\n                latest = *it;\n                if(j == curr.size()-1) count++;\n            }\n        }\n        return count;\n    }\n};\n```
['C++']