Solution for set intersection.