You are viewing a single comment's thread. Return to all comments →
Another simple but a bit less efficient python solution:
def matchingStrings(stringList, queries): count = [] for i in queries: occ = [j for j in stringList if i == j] count.append(len(occ)) return count
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 →
Another simple but a bit less efficient python solution: