Mathematical and Physical Journal
for High Schools
Issued by the MATFUND Foundation
Already signed up?
New to KöMaL?

Problem S. 18. (May 2006)

S. 18. A large binary data file contains at least 200 million, 8-byte floating point numbers. Write a program to sort these numbers into ascending order and write them back into the file. At most 50 megabytes of memory can be used, and only the original file can be opened. Its size can not be altered. The required running time (depending on the size of the file) is about a few minutes.

The name of the data file is given in the command line, for example, issuing

s18.exe adatok.dat

should sort the file data.dat.

The source code and documentation of your program (s18.pas, s18.cpp,\ldots) should be submitted.

(10 pont)

Deadline expired on June 15, 2006.


4 students sent a solution.
10 points:Engedy Balázs, Grósz Dániel, Nikházy László.
7 points:1 student.

Problems in Information Technology of KöMaL, May 2006