5 ways to the solution!!! with comments
1st Approach\nSimply store all the possible subsequce in the unordered_map and make a loop call on vector to search if it is found cnt++\n\n\nclass Solution {\n
**1st Approach**\nSimply store all the possible subsequce in the unordered_map and make a loop call on vector to search if it is found cnt++\n\n```\nclass Solution {\npublic:\n    void solve(string s, unordered_multiset<string>& set, int ind, string temp) {\n        if(ind >= s.length()) {\n            set.insert(temp);\n            return;\n        }\n        \n        //exclude\n        solve(s, set, ind + 1, temp);\n        \n        //include\n        char ch = s[ind];\n        temp.push_back(ch);\n        solve(s, set, ind + 1, temp);\n    }\n    \n    int numMatchingSubseq(string s, vector<string>& words) {\n        unordered_multiset<string> set;\n        \n        solve(s, set, 0, "");\n        \n        int cnt = 0;\n        for(string s: words) {\n            if(set.find(s) != set.end()) {\n                cnt++;\n            }\n        }\n        \n        return cnt;\n    }\n};\n```\n**RESULT** -> **TLE**\n\n**2nd Approach**\n2 pointer Approach on all the string in vector by comparing with our original string s\n\n```\nclass Solution {\npublic:\n    bool solve(string s, string st) {\n        //subsequnce length cannot be greater than original string\n        if(s.length() < st.length()) return false;\n        \n        int i = 0, j = 0;   //i for s, and j for st\n        while(i < s.length() && j < st.length()) {\n            if(s[i] == st[j]) {\n                i++;    j++;\n            }\n            else {\n                i++;  //Matlab jo original string h usko bda te rho if jaisi agar equal hote h toh i++ j++\n            }\n        }\n        \n        if(j < st.length()) return false;  //Matlab subsequence ka index uske length ke equal nhi hua \n        \n        return true;\n    }\n    \n    int numMatchingSubseq(string s, vector<string>& words) {\n        \n        int cnt = 0;\n        for(string it: words) {\n            if(solve(s, it)) {\n                cnt++;\n            }\n        }\n        \n        return cnt;\n    }\n};\n```\n**RESULT** -> **TLE**\n\n**3rd Approach**\nThe unorderd_map<char, vector<int>> is used to store all the indices of string s and then we make a call on string of vectors \n\n```\nclass Solution {\npublic:\n    //Watch tech dose video for refernce\n    bool solve(unordered_map<char, vector<int>> mp, string st) {\n        int low = -1;               //subsequnce should be in relative order \n        for(int i=0; i<st.length(); i++) {\n            if(mp.find(st[i]) == mp.end()) return false;  //agar aisa character jo string s me tha hi nhi\n            \n            vector<int> v = mp[st[i]];\n            \n            /* flag is used to determine whether we achieved to found the index which is greter than low\n            matlab agar mano ki low 5 tha ab hm dusre char pr aye pta chla uska index 3 nikla\n            vo index hamare low se chhota hua toh matlab relative order maintain nhi h subsequnce ka \n            isliye false */\n            \n            int flag = 0;         \n            for(int j=0; j<v.size(); j++) {\n                if(low < v[j]) {\n                    low = v[j];  flag = 1;\n                    break;\n                }\n            }\n            \n            if(flag == 0) return false;\n        }\n        \n        return true;\n    }\n    \n    int numMatchingSubseq(string s, vector<string>& words) {\n        unordered_map<char, vector<int>> mp;\n        \n        for(int i=0; i<s.length(); i++) {\n            mp[s[i]].push_back(i);\n        }\n        \n        int cnt = 0;\n        for(string it: words) {\n            if(solve(mp, it)) {\n                cnt++;\n            }\n        }\n        \n        return cnt;\n    }\n};\n```\n**RESULT** -> **TLE**\n\n**4th Approach**\nIt is same as 3rd but we are searching the indinces in log(n) time\n\n```\nclass Solution {\npublic:\n    //Watch tech dose video for refernce\n    bool solve(unordered_map<char, vector<int>> mp, string st) {\n        int low = -1;               //subsequnce should be in relative order \n        for(int i=0; i<st.length(); i++) {\n            if(mp.find(st[i]) == mp.end()) return false;  //agar aisa character jo string s me tha hi nhi\n            \n            vector<int> v = mp[st[i]];\n            \n            /* flag is used to determine whether we achieved to found the index which is greter than low\n            matlab agar mano ki low 5 tha ab hm dusre char pr aye pta chla uska index 3 nikla\n            vo index hamare low se chhota hua toh matlab relative order maintain nhi h subsequnce ka \n            isliye false */\n            \n        //The given stl fun. is implemented in Binary Search O(logn) whereas before we are applying O(n)\n            //upper_bound fun. used to find a maximum index gretaer than or low\n            auto it = upper_bound(v.begin(), v.end(), low);\n            \n            if(it == v.end()) return false;  //If not found any gretaer index than low\n            \n            low = *it;\n        }\n        \n        return true;\n    }\n    \n    int numMatchingSubseq(string s, vector<string>& words) {\n        unordered_map<char, vector<int>> mp;\n        \n        for(int i=0; i<s.length(); i++) {\n            mp[s[i]].push_back(i);\n        }\n        \n        int cnt = 0;\n        for(string it: words) {\n            if(solve(mp, it)) {\n                cnt++;\n            }\n        }\n        \n        return cnt;\n    }\n};\n```\n**RESULT** -> **TLE**\n\n**5th Last Approach**\nsimple use of find function on main string through strings of vector\n\n```\nclass Solution {\npublic:\n    bool solve(string &s, string &curr) {\n        int i = s.find(curr[0]);\n        if (i == -1) return false;      //If there is not char of curr in s it means it can not be subs.\n        \n        int pos = 1;                        //we already used 0th index above\n        while (pos < curr.length()) {\n            i = s.find(curr[pos], i + 1);   //it means aisa char jo i + 1 ke aage se ho\n            \n            /*\n            For example s = abcde and curr = acd \n                phle wala a jo h vo mil chuka hoga toh i = 0 hoga then we are saying s.find(c, 0 + 1);\n                toh i = 2 ho jayega aisa i = 3 ho jayega\n            \n            if curr = acb\n                phle wala a jo h vo mil chuka hoga toh i = 0 hoga then we are saying s.find(c, 0 + 1);\n                toh i = 2 ho jayega then we are saying s.find(b, 2 + 1) isme i = -1 ho jayegi kyunki h hi \n                nhi uske aage b toh false;\n            */\n            \n            if (i == -1) return false;\n            \n            pos++;\n        }\n        \n        return true;\n    }\n    \n    int numMatchingSubseq(string s, vector<string>& words) {\n        \n        int cnt = 0;\n        for(string it: words) {\n            if(solve(s, it)) {\n                cnt++;\n            }\n        }\n        \n        return cnt;\n    }\n};\n```\n**RESULT** -> **Passed with almost 95% beats in space and time complexity**\n\n**Do upvote if you like it!!!**\n
['Two Pointers', 'Binary Search', 'Recursion', 'C', 'C++', 'Java']