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 listJan 5, 2024 14:34Andrey LikhachevAndrey LikhachevScore: 349,698Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 5, 2024 14:34311,75214,112,498,7612,556,369,8370524,288
2Jan 5, 2024 14:34349,69814,723,392,7762,867,526,4910282,624
3Jan 5, 2024 14:34404,74515,787,536,6553,318,912,5740327,680