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 25, 2022 16:44Bernard 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 25, 2022 16:4400000Error: expected "2194107748 ", got "2"
2Nov 25, 2022 16:4400000Error: expected "2331407398 ", got "1"
3Nov 25, 2022 16:4400000Error: expected "2160219741 ", got "2"
4Nov 25, 2022 16:445,547113,623,27745,485,64902,240,512
5Nov 25, 2022 16:525,629110,614,58446,157,05002,297,856
6Nov 25, 2022 16:445,664111,453,55446,448,18202,277,376
7Nov 25, 2022 16:445,712106,723,33946,836,25502,293,760
8Nov 25, 2022 16:445,741115,847,68647,072,73702,248,704
9Nov 25, 2022 16:445,747101,108,34647,122,40702,248,704
10Nov 25, 2022 16:525,763117,477,93047,258,65602,248,704
11Nov 25, 2022 16:445,772109,751,44447,330,84702,252,800
12Nov 25, 2022 16:525,831114,457,79347,813,14202,195,456