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 listSep 7, 2024 22:14Henry CafaroHenry CafaroScore: 977,374Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2024 22:14972,0728,002,398,1797,758,148,000212,839,0002,281,472
2Sep 7, 2024 22:14972,1767,998,757,7117,768,004,000203,842,0002,428,928
3Sep 7, 2024 22:14974,3348,021,079,3147,800,671,000188,870,0002,465,792
4Sep 7, 2024 22:14975,0438,025,039,5757,787,498,000207,853,0002,281,472
5Sep 7, 2024 22:14977,3748,049,780,4337,811,636,000202,834,0002,281,472
6Sep 7, 2024 22:14977,6508,045,409,1137,817,885,000198,844,0002,281,472
7Sep 7, 2024 22:14978,2438,054,312,8487,818,731,000202,863,0002,387,968
8Sep 7, 2024 22:14978,3588,050,732,6577,816,676,000205,859,0002,387,968
9Sep 7, 2024 22:14979,3068,064,414,8827,810,466,000219,844,0002,281,472