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 21, 2022 16:13Bernard TeoBernard TeoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 21, 2022 16:1300000Error: expected "2176369302 ", got "6517704 99917 2845078 2"
2Nov 21, 2022 16:1300000Error: expected "2167283455 ", got "5857059 91397 2519302 2167283455"
3Nov 21, 2022 16:1300000Error: expected "2018423520 ", got "6150452 99490 6072257 2018423604"