To everyone commenting about this: There are cases where you need a disk aware sorting method. What if the file was 1TB? Even though 10,000,000 ints may not be a lot for many systems, the user may be on some architecture have some constraint. It isn't really helpful to say "just put it in memory" unless you also include an answer to the actual question along with this hint.
↧