• + 0 comments

    the method "count" will scan the entire data structure, which means O(n), since you are doing it for each element, that means we have O(n**2), consider using hashing somehow.