I like to do problems like this in sorted order, a holdover from my days when the data was all on tape with sequential reads only. If you can copy the list data into TreeSets and not mind losing duplicates you might be in business. Yesterday I posted my old favorite
Master-Update-Merge algorithm. I have a variation for any number of inputs instead of just two and even built it into a little utility so I never have to write it again. Let me know if that sounds interesting.
[ June 28, 2007: Message edited by: Stan James ]