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 20:56Drew GarciaDrew GarciaScore: 81,646Success
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 20:5754,675508,248,141448,332,35402,273,280
2Mar 29, 2024 20:5768,112631,147,077558,515,90202,273,280
3Mar 29, 2024 20:5671,368641,242,602585,221,57702,277,376
4Mar 29, 2024 20:5681,646748,231,240669,501,27002,281,472
5Mar 29, 2024 20:57111,590972,307,986915,039,28102,293,760
6Mar 29, 2024 20:56155,7681,348,153,1741,277,295,23802,256,896