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:46Robert BurkeRobert BurkeScore: 5,181Success
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:464,85866,127,25131,867,0007,966,0002,342,912
2Aug 2, 2022 22:464,91469,654,30729,215,00011,081,0002,527,232
3Aug 2, 2022 22:465,00765,865,91433,048,0008,011,0002,523,136
4Aug 2, 2022 22:465,03062,705,23632,192,0009,054,0002,342,912
5Aug 2, 2022 22:465,07569,803,43732,480,0009,135,0002,490,368
6Aug 2, 2022 22:465,119109,936,30841,973,20602,256,896
7Aug 2, 2022 22:465,18166,386,76336,414,0006,069,0002,383,872
8Aug 2, 2022 22:465,203114,517,24042,668,51802,191,360
9Aug 2, 2022 22:465,23565,065,06734,944,0007,987,0002,404,352
10Aug 2, 2022 22:465,274105,559,85743,245,57302,228,224
11Aug 2, 2022 22:465,28666,845,68232,260,00011,089,0002,396,160
12Aug 2, 2022 22:465,31070,047,61933,415,00010,125,0002,273,280