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 15, 2021 10:01Andrei GrazhdankovAndrei GrazhdankovError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 15, 2021 10:0100000Error: expected "2138323847 ", got "[128, 250, 112, 8, 144, 199, 7, 223, 119, 63, 171, 202, 250, 31, 4, 204, 69, 243, 252, 159, 170, 49, 95, 130, 147, 76, 0, 129, 74, 27, 204, 175, 25, 34, 167, 74, 247, 60, 43, 18, 105, 170, 116, 92, 35, 142, 251, 12, ...