A[j] - A[i] = k
generate random index for max value
remove duplicate
intersection of two arrays