A new array with elements from a
that are not in b
.
This function is useful for finding the difference between two arrays, effectively removing elements from the first array that are also present in the second array. It uses a Set
for efficient lookups.
Returns a new array containing elements from the first array that are not present in the second array.