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:33Drew GarciaDrew GarciaScore: 101,823Success
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:3760,239549,378,640493,958,10102,281,472
2Mar 29, 2024 15:3883,694751,403,015686,291,62202,277,376
3Mar 29, 2024 15:3788,905786,793,661729,024,28802,187,264
4Mar 29, 2024 15:38101,016885,959,590828,331,20002,273,280
5Mar 29, 2024 15:33101,823932,697,100834,949,95802,281,472
6Mar 29, 2024 15:33109,511964,091,068897,992,90202,281,472
7Mar 29, 2024 15:33124,3751,090,502,4181,019,873,94002,273,280
8Mar 29, 2024 15:38145,6221,257,614,7981,194,099,92402,277,376
9Mar 29, 2024 15:37217,4351,844,145,4611,782,969,47302,281,472