Apr-18-2019, 02:14 PM
Note that the product method has complexity O(A*B) while the hashtable method has O(A+B) complexity. For large data, the Counter code should be faster, while the product method is probably faster for small data due to the current implementation.