About.com/41 - Fast Number Lists Comparison

Problem Number - Problem Name

 * Programming Contest 41 - Fast Number Lists Comparison

The problem is closed to new submissions, but you are free to practice.

Summary
Given two lists of numbers (of 500000 entries each), determine which numbers are unique in a given file.

The time spent on the algorithm is calculated before parsing the files, until after the array of differences gets constructed. Generation of output is not timed.

Explanation
The solution requires the following:
 * A sorted list of integers. The files are initially unsorted.
 * A means to detect duplicates.

Gotchas

 * Any points one can easily overlook?
 * The correct way to understand ambiguous formulations?

Implementations
The fastest submission involved loading the two files into two independent arrays, and used s custom quicksort algorithm on the lists. (On blocks of 64 elements or less, it performed an insertion sort.)

Optimizations
Optimizations here.
 * The files may be loaded independently.

Input
Input is obtained directly from two files: http://cplus.about.com/library/downloads/challenges/41/pc41.zip

Output
"Average time = 0.87 sec" There are 146 differences 123456 234567

After the firs two lines, print each unique number.