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 21:22Robert BurkeRobert BurkeScore: 5,757Success
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 21:225,12363,795,11037,007,0005,001,0002,392,064
2Aug 2, 2022 21:225,30866,618,26631,377,00012,146,0002,506,752
3Aug 2, 2022 21:225,38568,336,64131,109,00013,045,0002,433,024
4Aug 2, 2022 21:225,68176,944,39938,484,0008,102,0002,473,984
5Aug 2, 2022 21:225,70873,038,38330,873,00015,934,0002,433,024
6Aug 2, 2022 21:225,714111,588,05446,856,48502,232,320
7Aug 2, 2022 21:225,757110,577,52747,205,77802,174,976
8Aug 2, 2022 21:225,76570,366,73434,195,00013,074,0002,420,736
9Aug 2, 2022 21:225,990106,932,20949,116,16202,285,568
10Aug 2, 2022 21:226,08878,949,07136,943,00012,980,0002,502,656
11Aug 2, 2022 21:226,12774,532,22337,179,00013,063,0002,367,488
12Aug 2, 2022 21:226,33371,867,43638,948,00012,982,0002,314,240