I have two arrays:
array1 = [3, 4, 4, 5, 6, 7, 8, 8]
array2 = [4, 5, 8, 8]
I want to remove those elements of array1, which are found in array2, but only in one instance. The resulting array, array3, must be like this:
array3 = [3, 4, 6, 7]
I tried:
array3 = array1 - array2
but the result was unsatisfactory:
array3 -> [3, 6, 7]