median of two sorted arrays

后端 未结 10 623
南旧
南旧 2020-12-16 19:12

My question is with reference to Method 2 of this link. Here two equal length sorted arrays are given and we have to find the median of the two arrays merged.



        
10条回答
  •  抹茶落季
    2020-12-16 20:04

    This is my C# solution:

    public double FindMedianSortedArrays(int[] nums1, int[] nums2) {

        List sorted = new List();
    
        if(nums1.Length>nums2.Length){
            for(int i=0; i

提交回复
热议问题