You are viewing a single comment's thread. Return to all comments →
solve in c++
vector<int> matchingStrings(vector<string> stringList, vector<string> queries) { int count=0; vector<int> ans; for(int i=0 ;i<queries.size();i++){ count=0; for(int j=0;j<stringList.size();j++){ if(queries[i]==stringList[j]){ count++; } } ans.push_back(count); } return (ans); }
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 →
solve in c++