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 24, 2024 19:09Joad 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 24, 2024 19:0800000Error: expected "2124419239 ", got "2124419236"
2Apr 24, 2024 19:0900000Error: expected "2165872436 ", got "2165872441"
3Apr 24, 2024 19:0973,903664,219,086606,004,68202,277,376
4Apr 24, 2024 19:0978,279702,432,611641,885,86402,281,472
5Apr 24, 2024 19:09105,707931,422,839866,801,19702,273,280