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 listJan 15, 2025 20:09Ian MckibbenIan MckibbenScore: 12,776Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 15, 2025 20:0912,758139,539,016103,609,0001,005,0002,428,928
2Jan 15, 2025 20:0912,759133,416,771103,619,0001,006,0002,416,640
3Jan 15, 2025 20:0912,766131,544,175102,685,0001,993,0002,465,792
4Jan 15, 2025 20:0912,775130,370,522102,761,0001,995,0002,424,832
5Jan 15, 2025 20:0912,776135,156,768102,766,0001,995,0002,445,312
6Jan 15, 2025 20:0912,782131,285,044102,816,0001,996,0002,420,736
7Jan 15, 2025 20:0912,787130,481,212101,862,0002,995,0002,441,216
8Jan 15, 2025 20:0912,792127,539,631102,896,0001,997,0002,433,024
9Jan 15, 2025 20:0912,923128,688,356104,966,000999,0002,523,136