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 11, 2024 07:24Matt StuchlikMatt StuchlikScore: 9,325Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 11, 2024 07:248,83597,136,76663,394,0009,056,0002,478,080
2Nov 11, 2024 07:259,038101,701,42067,099,0007,010,0002,469,888
3Nov 11, 2024 07:259,12799,189,35969,854,0004,989,0002,498,560
4Nov 11, 2024 07:249,12899,298,19161,875,00012,973,0002,523,136
5Nov 11, 2024 07:249,32593,584,93870,432,0006,037,0002,334,720
6Nov 11, 2024 07:249,804106,744,91272,355,0008,039,0002,523,136
7Nov 11, 2024 07:2410,527107,795,56881,300,0005,018,0002,486,272
8Nov 11, 2024 07:2410,775111,486,01582,330,0006,024,0002,437,120
9Nov 11, 2024 07:2511,027114,730,00682,384,0008,037,0002,351,104