Given two integer array A and B of size N and M respectively. Your task is to find all the common elements in both the array. code example
Example: can we calculate the intersection of duplicate ele
from collections import Counter
c = list((Counter(a) & Counter(b)).elements())