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 listDec 21, 2023 10:36Oleg KovalovOleg KovalovError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 21, 2023 10:3600000Error: Exit with code 2: unexpected fault address 0x560312031520 fatal error: fault [signal SIGSEGV: segmentation violation code=0x1 addr=0x560312031520 pc=0x56030602a8cb] goroutine 1 [running]: runtime.throw({0x56030602b2f2?, 0xcc1bdb?}) /tmp/go1.21...stderr