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 listOct 3, 2026 01:19Karthik ReddyKarthik ReddyError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 3, 2026 01:1901,086,723,614982,216,00093,609,00020,480expected "2177578665 ", got "disp1k 0.993 disp8k 0.972 disp64k 0.968 zmax 4.7 4.2 3.7 nb 95648 11956 1470 "
2Oct 3, 2026 01:190935,902,545832,751,00092,426,0002,113,536expected "2169826371 ", got "disp1k 0.998 disp8k 0.974 disp64k 0.938 zmax 4.6 3.9 3.0 nb 93696 11712 1440 "
3Oct 3, 2026 01:190898,738,959799,803,00088,193,00020,480expected "2202142124 ", got "disp1k 0.997 disp8k 0.983 disp64k 0.930 zmax 6.0 4.1 3.2 nb 92720 11590 1425 "