add lg(m+n) method to median of sorted arrays