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 4, 2023 21:13Franek KortaFranek KortaScore: 15,508Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 4, 2023 21:1413,243165,387,662108,594,53802,301,952
2Jun 4, 2023 21:1313,950171,617,784114,387,70302,187,264
3Jun 4, 2023 21:1414,692181,969,165120,473,18702,260,992
4Jun 4, 2023 21:1415,508184,510,442127,167,89102,179,072
5Jun 4, 2023 21:1316,530216,913,405135,542,63502,199,552
6Jun 4, 2023 21:1316,535198,881,862135,587,87302,232,320