Sort no more than 10 million 7-digit numbers. Limitations: 1M RAM, high speed. a few seconds are good.
[Edit: from comment by questioner: input values are different]
Using a Bitmap data structure is a good solution to this problem.
This means that I need a string whose length does not exceed 10 million ???? Is RAM enough for this? confused here. Thanks you
source
share