You are viewing a single comment's thread. Return to all comments →
Here's my one line code in Python def matchingStrings(strings, queries): return [strings.count(ele) if ele in strings else 0 for ele in queries]
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 →
Here's my one line code in Python def matchingStrings(strings, queries): return [strings.count(ele) if ele in strings else 0 for ele in queries]