There are two parts to this challenge.
- Take the given file of 4 billion numbers output a sorted and unique list of those numbers to another file.
Some things to note about the file, there are about 4 billion numbers. Any duplicates numbers can be ignore in the output file.
When evaluating you solution try to minimize the amount of memory you are using. Having constant usage regardless of file is better. An input file and a solution file is provided, when demoing the solution, an additional different input file and solution file will be provided.
- Create a program that generates about 4 billion random 32 bit number and writes it into a file.
The numbers.zip files contains files that you can use to test your programs. The files that start with sorted are the sorted versions.
*This problem was stolen from Programming Pearls by Jon Bentley. (978-0-201-65788-3)