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 listMar 29, 2024 15:29Drew GarciaDrew GarciaScore: 95,534Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 29, 2024 15:2960,618578,317,274497,071,36902,203,648
2Mar 29, 2024 15:2367,573617,057,903554,097,04802,285,568
3Mar 29, 2024 15:1370,691642,153,955579,667,92202,293,760
4Mar 29, 2024 15:2974,003678,201,233606,825,11502,273,280
5Mar 29, 2024 15:2382,220738,958,443674,203,55602,191,360
6Mar 29, 2024 15:2985,646754,520,824702,300,79402,269,184
7Mar 29, 2024 15:1395,534854,502,792783,380,81302,199,552
8Mar 29, 2024 15:2399,402879,185,244815,093,07902,277,376
9Mar 29, 2024 15:29100,502882,235,582824,114,36902,281,472
10Mar 29, 2024 15:13109,788955,582,628900,257,82502,269,184
11Mar 29, 2024 15:29112,239978,164,813920,358,45202,297,856
12Mar 29, 2024 15:29203,2261,728,247,1241,666,454,69502,277,376