and this condition happens when we don 't have any elements in the  first half from b[] so we  returning the last element in  a[] from the first half.
else if ( j == 0 ) median = a [ i - 1 ] ; else median = maximum ( a [ i - 1 ] , b [ j - 1 ] ) ; break ; } }