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 22:58Robert BurkeRobert BurkeScore: 4,978Success
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 22:584,75967,310,32533,023,0006,004,0002,404,352
2Aug 2, 2022 22:584,81361,254,61431,370,0008,095,0002,379,776
3Aug 2, 2022 22:584,84170,595,47430,762,0008,931,0002,355,200
4Aug 2, 2022 22:584,87064,250,59130,947,0008,984,0002,342,912
5Aug 2, 2022 22:584,89262,469,36331,092,0009,026,0002,506,752
6Aug 2, 2022 22:584,975103,200,95340,794,84302,174,976
7Aug 2, 2022 22:584,97865,468,58030,866,0009,956,0002,330,624
8Aug 2, 2022 22:584,99260,030,42228,952,00011,980,0002,510,848
9Aug 2, 2022 22:585,01163,178,45632,070,0009,019,0002,322,432
10Aug 2, 2022 22:585,13095,250,70842,069,39702,228,224
11Aug 2, 2022 22:585,13199,773,69142,077,63002,199,552
12Aug 2, 2022 22:585,24564,383,79627,008,00016,005,0002,400,256