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 ) : NEW_LINE INDENT print ( " The ▁ median ▁ is : ▁ " , findMedianSortedArrays ( a , n , b , m ) ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " The ▁ median ▁ is : ▁ " , findMedianSortedArrays ( b , m , a , n ) ) NEW_LINE DEDENT