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 listJun 21, 2021 07:05Andrey TsvetkovAndrey TsvetkovError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 21, 2021 07:0500000Error: expected "2071799445 ", got "2071799460 "
2Jun 21, 2021 07:0600000Error: expected "2254122863 ", got "2254122797 "
3Jun 21, 2021 07:0597,716861,937,831801,271,08202,224,128
4Jun 21, 2021 07:05104,256932,449,933854,895,61702,224,128
5Jun 21, 2021 07:05112,219990,321,969920,197,06602,236,416