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 20, 2024 16:16Joad NacerJoad NacerScore: 8,063Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 20, 2024 16:165,03564,573,34433,228,0008,055,0002,285,568
2Nov 20, 2024 16:165,95579,507,86940,862,0007,973,0002,502,656
3Nov 20, 2024 16:166,95782,329,26949,042,0008,006,0002,519,040
4Nov 20, 2024 16:167,80088,092,90055,964,0007,994,0002,461,696
5Nov 20, 2024 16:168,06392,630,49457,099,0009,015,0002,473,984
6Nov 20, 2024 16:168,21195,962,41659,289,0008,039,0002,347,008
7Nov 20, 2024 16:168,34692,000,45861,394,0007,045,0002,506,752
8Nov 20, 2024 16:168,43791,422,96061,165,0008,021,0002,424,832
9Nov 20, 2024 16:169,554101,857,08370,310,0008,035,0002,428,928