Best solutions for median of array