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 21, 2022 17:37Bernard 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 21, 2022 17:3700000Error: expected "2141370592 ", got "2"
2Nov 21, 2022 17:3700000Error: expected "1938029595 ", got "1"
3Nov 21, 2022 17:3700000Error: expected "2376260178 ", got "1"
4Nov 21, 2022 17:3900000Error: expected "2242400978 ", got "2"
5Nov 21, 2022 17:375,687108,707,33846,633,97702,240,512
6Nov 21, 2022 17:375,784133,051,23647,430,09802,306,048
7Nov 21, 2022 17:375,795115,618,08647,515,82302,232,320
8Nov 21, 2022 17:375,875110,485,48648,176,48802,220,032
9Nov 21, 2022 17:375,916101,380,69448,514,80102,183,168
10Nov 21, 2022 17:375,979119,018,26449,031,52802,187,264