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 ) System . out . print ( " The ▁ median ▁ is : ▁ " + findMedianSortedArrays ( a , n , b , m ) ) ; else System . out . print ( " The ▁ median ▁ is : ▁ " + findMedianSortedArrays ( b , m , a , n ) ) ; } }