Skip to content

Commit 4719482

Browse files
author
Aditya Mukherjee
committed
Made few variable naming changes
1 parent 1506730 commit 4719482

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Leetcode/Median_of_Two_Sorted_Arrays.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Solution {
3030
int mid2 = (n1 + n2 + 1)/2 - mid1;
3131
// why?? => suppose nums1[] is partitioned at index 3 => nums1[3] = 7.
3232

33-
std::pair<int, int> maxleft, maxright;
33+
std::pair<int, int> maxleft, minright;
3434
maxleft.first = mid1 == 0 ? INT_MIN : nums1[mid1-1];
3535
maxleft.second = mid2 == 0 ? INT_MIN : nums2[mid2-1];
3636

@@ -68,7 +68,7 @@ int main(int argc, char const *argv[])
6868
std::cin>>arr2[i];
6969
}
7070

71-
const Solution sol = new Solution();
71+
Solution sol = Solution();
7272
double res = sol.findMedianSortedArrays(arr1, arr2);
7373

7474
std::cout<<res<<"\n";

0 commit comments

Comments
 (0)