You are viewing a single comment's thread. Return to all comments →
def matchingStrings(strings, queries):
data = {e: strings.count(e) for e in strings} result = [data[q] if q in data else 0 for q in queries] return result
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 →
def matchingStrings(strings, queries):