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 listMar 29, 2024 15:39Drew GarciaDrew GarciaScore: 86,578Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 29, 2024 15:3965,355603,724,642535,913,25202,281,472
2Mar 29, 2024 15:3470,339640,386,696576,780,56902,285,568
3Mar 29, 2024 15:3480,900730,514,621663,376,49302,281,472
4Mar 29, 2024 15:3986,578775,321,829709,941,97002,281,472
5Mar 29, 2024 15:3998,552878,972,731808,123,34102,273,280
6Mar 29, 2024 15:34118,1141,023,095,719968,532,73002,183,168