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 25, 2025 19:03Drew GarciaDrew GarciaScore: 25,758Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 25, 2025 19:0324,974231,521,087203,790,000998,0002,404,352
2Mar 25, 2025 19:0325,073234,985,445205,597,00002,265,088
3Mar 25, 2025 19:0325,584241,184,446207,788,0001,997,0002,408,448
4Mar 25, 2025 19:0325,712237,894,633208,841,0001,998,0002,408,448
5Mar 25, 2025 19:0325,758232,387,257209,210,0002,002,0002,265,088
6Mar 25, 2025 19:0325,858234,848,279209,039,0003,000,0002,269,184
7Mar 25, 2025 19:0325,908241,308,221210,440,0002,004,0002,269,184
8Mar 25, 2025 19:0325,919239,849,340211,532,0001,002,0002,396,160
9Mar 25, 2025 19:0326,077241,060,059211,834,0001,998,0002,400,256