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 listNov 11, 2024 07:19Matt StuchlikMatt StuchlikError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 11, 2024 07:1800000Error: expected "2240824807 ", got "0 "stderr
2Nov 11, 2024 07:198,23891,951,39658,613,0008,940,0002,281,472
3Nov 11, 2024 07:198,85297,881,40966,535,0006,048,0002,514,944
4Nov 11, 2024 07:1911,168116,055,33084,530,0007,044,0002,334,720