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 listApr 4, 2024 08:50Chiraag BaluChiraag BaluScore: 124,862Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 4, 2024 08:5297,961864,550,150803,276,76502,179,072
2Apr 4, 2024 08:52107,782945,027,363883,811,36002,240,512
3Apr 4, 2024 08:52115,6981,000,311,437948,723,96602,183,168
4Apr 4, 2024 08:50124,8621,087,076,4031,023,867,47602,183,168
5Apr 4, 2024 08:50133,0141,163,065,2221,090,712,46802,301,952
6Apr 4, 2024 08:50136,6241,196,844,9681,120,320,81602,179,072