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 26, 2022 17:18Bernard TeoBernard TeoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 26, 2022 17:1800000Error: expected "2095905857 ", got "2"
2Nov 26, 2022 17:1800000Error: expected "2145589780 ", got "2"
3Nov 26, 2022 17:184,704115,956,32438,572,68302,285,568
4Nov 26, 2022 17:184,860132,773,03539,852,04502,301,952
5Nov 26, 2022 17:184,876121,387,23339,984,67702,183,168
6Nov 26, 2022 17:184,89496,110,28440,128,16702,203,648
7Nov 26, 2022 17:185,05899,123,89241,477,23102,195,456
8Nov 26, 2022 17:185,117111,981,60541,956,29802,273,280