Find The Median Hackerrank Solution In Java