Find the k the element in two sorted array

Can easily extend to find the median in two sorted array