Quote:
i mean is it possible in any other way?
Of course it is possible: iterating over the candidate vector (e.g.
B
) items, check if the item is contained in
A
. However you have to invalidate the items of
A
already matched (you could use another vector for the purpose).