we need to define the smaller array as the first parameter to make sure that the time complexity will be O ( log ( min ( n , m ) ) )
if ( n < m ) document . write ( " " + findMedianSortedArrays ( n , m ) ) ; else document . write ( " " + findMedianSortedArrays ( m , n ) ) ;