class Solution {
public double findMedianSortedArrays(int[] nums1, int[] nums2) {
int len1= nums1.length;
int len2= nums2.length;
double [] arr =new double[len1+len2];
for(int i=0;i<len1;i++){
arr[i]=nums1[i];
}
for (int j = 0;j<len2;j++){
arr[j+len1]=nums2[j];
}
Arrays.sort(arr);
int mid=(len1+len2)/2;
if (arr.length%2==0)
return (arr[mid-1]+arr[mid])/2;
return arr[mid];
}
}