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 listSep 11, 2022 14:31Bernard TeoBernard TeoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 11, 2022 14:3100000Error: expected "2228664658 ", got "1"
2Sep 11, 2022 14:318,876135,728,15172,784,42902,203,648
3Sep 11, 2022 14:319,665154,167,98779,256,98402,289,664
4Sep 11, 2022 14:319,671158,062,55779,299,25002,187,264
5Sep 11, 2022 14:319,820140,670,84880,520,91202,256,896
6Sep 11, 2022 14:3110,341144,352,17084,795,52202,224,128
7Sep 11, 2022 14:3110,373158,864,55485,054,66602,281,472