Two-pass algorithm for ∩Bag (bag intersection) based on hashing