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 28, 2024 16:31Drew GarciaDrew GarciaScore: 1,016,211Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 28, 2024 16:311,001,4608,273,183,5528,211,973,68102,277,376
2Mar 28, 2024 16:311,016,2118,393,269,2858,332,928,77902,265,088
3Mar 28, 2024 16:311,040,5498,594,731,2438,532,503,66902,269,184