We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Data Structures
- Arrays
- Sparse Arrays
- Discussions
Sparse Arrays
Sparse Arrays
Sort by
recency
|
2404 Discussions
|
Please Login in order to post a comment
}
Perl:
vector matchingStrings(vector stringList, vector queries) {
unordered_map mymap; vector ans;
for( auto i : stringList){ mymap[i]++; }
for( auto i : queries){ ans.push_back(mymap[i]); }
return ans; }
This task is a great exercise in working with collections and efficiently handling data queries. matchbox 9 registration