You are viewing a single comment's thread. Return to all comments →
My C++ solution:
vector<int> matchingStrings(vector<string> stringList, vector<string> queries) { map<string, int> mpp; vector<int> res; for(string s: stringList) mpp[s]++; for(string s: queries) res.push_back(mpp[s]); return res; }
Seems like cookies are disabled on this browser, please enable them to open this website
Sparse Arrays
You are viewing a single comment's thread. Return to all comments →
My C++ solution: