Sparse Arrays

  • + 0 comments
    def matchingStrings(strings, queries):
        # Write your code here
        count_arr=[]
        for i in queries:
            count=0
            for item in strings:
                if i == item:
                    count+=1
            count_arr.append(count)
        return count_arr``