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 listNov 11, 2021 06:10Sergey StreminSergey StreminScore: 12,780Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 11, 2021 06:1012,626166,894,763103,537,21702,240,512
2Nov 11, 2021 06:1112,711168,917,910104,233,65902,281,472
3Nov 11, 2021 06:1012,719168,518,213104,295,72602,277,376
4Nov 11, 2021 06:1112,728176,873,044104,367,97202,277,376
5Nov 11, 2021 06:1212,748167,935,741104,532,57902,273,280
6Nov 11, 2021 06:1212,765164,785,861104,672,76302,285,568
7Nov 11, 2021 06:1012,780166,759,923104,797,10802,277,376
8Nov 11, 2021 06:1012,791166,381,365104,887,19702,273,280
9Nov 11, 2021 06:1212,791202,044,559104,887,08002,240,512
10Nov 11, 2021 06:1012,803188,501,029104,981,01702,273,280
11Nov 11, 2021 06:1012,803167,396,810104,986,67302,260,992
12Nov 11, 2021 06:1112,811171,448,940105,046,73202,281,472