• + 0 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