My solution to 1 median