There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
public double findMedianSortedArrays(int[] nums1, int[] nums2) {
int[] a = new int[nums1.length+nums2.length];
for(int i=0; i<nums1.length; i++)