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 listJun 13, 2021 05:19Yuriy LyfenkoYuriy LyfenkoScore: 8,341Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 13, 2021 05:198,17789,394,17749,036,00018,013,0002,342,912
2Jun 13, 2021 05:198,18392,511,31952,079,00015,022,0002,326,528
3Jun 13, 2021 05:198,20393,010,11648,190,00019,075,0002,490,368
4Jun 13, 2021 05:198,23491,412,68752,401,00015,115,0002,490,368
5Jun 13, 2021 05:198,26998,187,26651,853,00015,955,0002,490,368
6Jun 13, 2021 05:198,271101,767,27047,874,00019,947,0002,404,352
7Jun 13, 2021 05:198,34194,680,40949,287,00019,111,0002,330,624
8Jun 13, 2021 05:198,36699,123,84350,441,00018,158,0002,351,104
9Jun 13, 2021 05:198,39197,433,02454,844,00013,960,0002,494,464
10Jun 13, 2021 05:198,619137,948,03670,676,97402,228,224
11Jun 13, 2021 05:198,676145,405,35471,139,15802,228,224
12Jun 13, 2021 05:1910,535145,002,17186,385,37802,236,416