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 20, 2021 12:43Andrey TsvetkovAndrey TsvetkovScore: 141,998Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 20, 2021 12:42113,743993,560,812932,690,62502,310,144
2Jun 20, 2021 12:42118,5721,034,909,363972,286,50502,314,240
3Jun 20, 2021 12:42120,6571,048,521,301989,389,29502,265,088
4Jun 20, 2021 12:43141,9981,274,454,1341,164,386,24902,355,200
5Jun 20, 2021 12:43187,8933,794,798,6471,540,723,76802,650,112
6Jun 20, 2021 12:43342,95414,853,793,7442,812,220,93102,273,280