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 listJul 15, 2023 06:45Paul MasurelPaul MasurelScore: 5,971Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 15, 2023 06:455,56374,864,89539,537,0006,082,0002,486,272
2Jul 15, 2023 06:455,56570,802,65940,565,0005,070,0002,482,176
3Jul 15, 2023 06:455,66574,905,43034,332,00012,117,0002,396,160
4Jul 15, 2023 06:455,681118,260,48946,582,17102,314,240
5Jul 15, 2023 06:455,74974,840,89740,118,0007,020,0002,514,944
6Jul 15, 2023 06:455,861116,649,63248,061,01402,277,376
7Jul 15, 2023 06:455,971121,055,22748,963,57902,220,032
8Jul 15, 2023 06:455,98775,144,07139,077,00010,019,0002,293,760
9Jul 15, 2023 06:456,14777,558,55142,342,0008,065,0002,387,968
10Jul 15, 2023 06:456,31580,045,41141,824,0009,958,0002,301,952
11Jul 15, 2023 06:4520,344191,460,227154,833,00011,987,0002,469,888
12Jul 15, 2023 06:4520,505194,460,417160,135,0008,006,0002,383,872