I want to delete an array of elements from another one,
DeleteCases
seems to be an option, but the problem is that it deletes an element more than once if available, I do not want this. I want to delete any element as many times as available in second list.
For example DeleteCases[{1, 1, 2, 3}, Alternatives@@{1, 2}]
gives {3}
, which means it deleted 1
twice from the first array. I want the output to be {1, 3}
.
Is there any function other than DeleteCases
which can do this?
{1,2,3}
and not{1,3}
$\endgroup$