Median Sergey Svistunov

Find the median of a stream of binary integers as fast as possible.

Input: 100 000 000 uint32 values in little-endian binary on STDIN (4 bytes each).

Output: The median value, printed as a decimal string. The median is defined as the element at index N/2 (i.e., a[50000000]) in the sorted array.

Back to listAug 2, 2022 16:50Robert BurkeRobert BurkeScore: 8,995Success
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 2, 2022 16:508,93694,864,16959,225,00014,053,0002,445,312
2Aug 2, 2022 16:508,95895,477,99561,384,00012,075,0002,318,336
3Aug 2, 2022 16:508,95999,460,95061,390,00012,076,0002,285,568
4Aug 2, 2022 16:508,96197,546,53064,425,0009,059,0002,453,504
5Aug 2, 2022 16:508,976103,980,40960,495,00013,107,0002,301,952
6Aug 2, 2022 16:508,979108,765,53763,545,00010,086,0002,433,024
7Aug 2, 2022 16:508,99599,684,15662,796,00010,964,0002,351,104
8Aug 2, 2022 16:509,00096,835,52562,830,00010,970,0002,469,888
9Aug 2, 2022 16:509,00597,086,15855,882,00017,962,0002,289,664
10Aug 2, 2022 16:509,011124,240,10573,890,04902,281,472
11Aug 2, 2022 16:509,049138,481,82874,200,21302,170,880
12Aug 2, 2022 16:509,059131,053,65774,286,90002,207,744