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 listApr 20, 2024 01:13Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 20, 2024 01:1400000Error: expected "2080740195 ", got "20807401952080740199"
2Apr 24, 2024 19:0500000Error: expected "2061526921 ", got "20615269212061526914"
3Apr 20, 2024 01:13123,4161,076,183,8531,012,012,37802,260,992
4Apr 20, 2024 01:13125,9271,097,835,7651,032,603,09902,240,512
5Apr 20, 2024 01:13127,9991,116,514,4631,049,589,43002,256,896