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:50Andrey 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:5000000Error: exit with code 2: unexpected fault address 0x7fc3c2c00000 fatal error: fault [signal SIGSEGV: segmentation violation code=0x2 addr=0x7fc3c2c00000 pc=0x55771444b980] goroutine 1 [running]: runtime.throw(0x5577144a835c, 0x5) /usr/lib/go-1.13/src...stderr