in reply to The most efficient way for searching for an element in an array?

If arrays 2 and 3 are not too big and they fit in the available RAM, just convert them into hashes for faster lookup.

Otherwise, sort the three arrays using some external sort algorithm and then read them in parallel while looking for duplicates.

  • Comment on Re: The most efficient way for searching for an element in an array?