You are viewing a single comment's thread. Return to all comments →
Here's mine in Python 3.6
def matchingStrings(strings, queries): d = {} l = [] for i in strings: d[i] = d.get(i,0) + 1 for i in queries: l.append(d.get(i,0)) return l
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 mine in Python 3.6