@Mohit: I've got 8 gigabytes of main memory. What is 8 megabytes
compared to that?
Dave
On Oct 18, 4:08 am, "MOHIT " wrote:
> i think i we shoul use external sort like merge sort because 1 million
> number should not be stored in main memory it should be on secondory device
> .
--
You rece
I agree. Use any good sorting algorithm.
And regarding the ubiquitous advice against comparing floating point
numbers: they are only approximations to real numbers, and most real
numbers are not represented exactly as floating point numbers.
Therefore, two floating point approximations to the same
On a single threaded architecture, I would use the quick sort:
http://en.wikipedia.org/wiki/Quick_sort
On a parallel architecture, I would use Parallel Sorting by Regular
Sampling:
https://agora.cs.illinois.edu/download/attachments/24348363/Sort+ParaProg(Quinn)chpt14.5.pdf
In the case of floating