human
Median of two sorted arrays with different sizes in O ( log ( min ( n , m ) ) ) | Function to find median of given two sorted arrays.
if i = n , it means that Elements from a [ ] in the second half is an empty set . If j = 0 , it means that Elements from b [ ] in the first half is an empty set . so it is necessary to check that , because we compare elements from these two groups . searching on right.
if i = 0 , it means that Elements from a [ ] in the first half is an empty set and if j = m , it means that Elements from b [ ] in the second half is an a [ ] in the first half is an empty set that , because we compare elements from these two groups . searching on left.
we have found the desired halves ..
this condition happens when we don 't have  any elements in the first half from a[] so  we returning the last element in b[] from  the first half..
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..
Function to find maximum.
Driver code.
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 ) ) )"
Solution in Python:

=====
Write me a code to median of two sorted arrays with different sizes in O ( log ( min ( n , m ) ) ) and the other steps required?
assistant
#Here is code to median of two sorted arrays with different sizes in O ( log ( min ( n , m ) ) ) and the other steps required.
 def findMedianSortedArrays ( a , n , b , m ) :
	min_index = 0
	max_index = n
	while ( min_index <= max_index ) :
		i = ( min_index + max_index ) // 2
		j = ( ( n + m + 1 ) // 2 ) - i
		if ( i < n and j > 0 and b [ j - 1 ] > a [ i ] ) :
			min_index = i + 1
		elif ( i > 0 and j < m and b [ j ] < a [ i - 1 ] ) :
			max_index = i - 1
		else :
			if ( i == 0 ) :
				return b [ j - 1 ]
			if ( j == 0 ) :
				return a [ i - 1 ]
			else :
				return maximum ( a [ i - 1 ] , b [ j - 1 ] )
	print ( " ERROR ! ! ! ▁ " ,   " returning " )
	return 0
def maximum ( a , b ) :
	return a if a > b else b
if __name__ == " _ _ main _ _ " :
	a = [ 900 ]
	b = [ 10 , 13 , 14 ]
	n = len ( a )
	m = len ( b )
	if ( n < m ) :
		print ( " The ▁ median ▁ is : ▁ " , findMedianSortedArrays ( a , n , b , m ) )
	else :
		print ( " The ▁ median ▁ is : ▁ " , findMedianSortedArrays ( b , m , a , n ) )