Frequency-Weighted Median Estimator - Coding problem | OneNoughtOne