Skip to content

Commit aa0b4d3

Browse files
committed
#4: description update
1 parent e952b64 commit aa0b4d3

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

c-sharp/Problems/binary-search/MedianOfTwoSortedArrays.cs

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,28 @@
22
* 4
33
* Median of Two Sorted Arrays
44
**
5-
* Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.
6-
* The overall run time complexity should be O(log (m+n)).
5+
* Given two sorted arrays nums1 and nums2 of size m and n respectively,
6+
* return the median of the two sorted arrays.
7+
*
8+
* The overall run time complexity should be O(log (m+n)).
9+
*
10+
* Example 1:
11+
* Input: nums1 = [1,3], nums2 = [2]
12+
* Output: 2.00000
13+
* Explanation: merged array = [1,2,3] and median is 2.
14+
*
15+
* Example 2:
16+
* Input: nums1 = [1,2], nums2 = [3,4]
17+
* Output: 2.50000
18+
* Explanation: merged array = [1,2,3,4] and median is (2 + 3) / 2 = 2.5.
19+
*
20+
* Constraints:
21+
* • nums1.length == m
22+
* • nums2.length == n
23+
* • 0 <= m <= 1000
24+
* • 0 <= n <= 1000
25+
* • 1 <= m + n <= 2000
26+
* • -10^6 <= nums1[i], nums2[i] <= 10^6
727
**
828
* https://leetcode.com/problems/median-of-two-sorted-arrays/
929
***/

0 commit comments

Comments
 (0)