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 22, 2022 15:53Bernard TeoBernard TeoScore: 5,790Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 22, 2022 15:535,619120,994,53246,075,12502,285,568
2Nov 22, 2022 15:545,750123,552,58247,147,91502,285,568
3Nov 22, 2022 15:535,758111,383,19547,217,24702,174,976
4Nov 22, 2022 15:535,785110,313,76447,433,78502,281,472
5Nov 22, 2022 15:535,790104,896,33247,477,62702,260,992
6Nov 22, 2022 15:535,828123,920,78647,791,24102,195,456
7Nov 22, 2022 15:545,903125,922,26948,402,75202,211,840
8Nov 22, 2022 15:546,051114,318,08149,620,83402,248,704
9Nov 22, 2022 15:536,084128,281,72749,890,41502,281,472