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 listSep 4, 2022 10:09Eugene ZhydzetskiEugene ZhydzetskiError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2022 10:0900000Error: Exit with code 2: unexpected fault address 0x7f6b92400000 fatal error: fault [signal SIGSEGV: segmentation violation code=0x2 addr=0x7f6b92400000 pc=0x55c3438886e8] goroutine 1 [running]: runtime.throw({0x55c3438ef375?, 0x17d7841?}) /tmp/go1.1...stderr