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 listDec 19, 2024 15:33eldon-chungeldon-chungError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 19, 2024 15:2600000Error: expected "2035191344 ", got "0 "stderr
2Dec 19, 2024 15:2800000Error: expected "2075055574 ", got "0 "stderr
3Dec 19, 2024 15:33960,1167,906,181,4297,686,116,000186,832,0002,318,336
4Dec 19, 2024 15:33961,9997,921,353,5557,693,558,000194,836,0002,277,376
5Dec 19, 2024 15:33966,4937,956,607,7297,750,394,000174,850,0002,277,376