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 listOct 31, 2021 10:03Ilya AniskovetsIlya AniskovetsError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 31, 2021 10:0300000Error: expected "2073952509 ", got "2073952489 "
2Oct 31, 2021 10:1000000Error: expected "2167615361 ", got "2167615317 "
3Oct 31, 2021 10:1300000Error: expected "2271647807 ", got "2271647804 "
4Oct 31, 2021 10:1400000Error: expected "2207902373 ", got "2207902326 "