Array Intersection problem (not from book)