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 listJun 11, 2021 18:42Andrey TsvetkovAndrey TsvetkovError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 11, 2021 18:4200000Error: exit with code 2: unexpected fault address 0x7fcdf4dd7840 fatal error: fault [signal SIGSEGV: segmentation violation code=0x2 addr=0x7fcdf4dd7840 pc=0x55759404b980] goroutine 1 [running]: runtime.throw(0x5575940a835c, 0x5) /usr/lib/go-1.13/src...stderr