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 3, 2022 12:54Robert BurkeRobert BurkeScore: 4,658Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 3, 2022 12:544,50264,974,05825,944,00010,976,0002,347,008
2Aug 3, 2022 12:544,50661,839,67624,968,00011,984,0002,408,448
3Aug 3, 2022 12:544,52358,258,35129,071,0008,019,0002,506,752
4Aug 3, 2022 12:544,53063,837,63631,125,0006,024,0002,404,352
5Aug 3, 2022 12:544,61365,088,88130,859,0006,968,0002,473,984
6Aug 3, 2022 12:544,63859,839,18529,025,0009,007,0002,523,136
7Aug 3, 2022 12:544,65870,116,50925,127,00013,066,0002,363,392
8Aug 3, 2022 12:544,66891,633,56138,279,00502,207,744
9Aug 3, 2022 12:544,68064,679,03829,284,0009,088,0002,498,560
10Aug 3, 2022 12:544,755107,817,03338,988,33702,207,744
11Aug 3, 2022 12:544,832105,201,57939,622,35602,224,128
12Aug 3, 2022 12:545,28165,250,59933,237,00010,071,0002,412,544