From 6dab76add369b23800009efb210ce04157049c13 Mon Sep 17 00:00:00 2001 From: Deven <63876261+devenperez@users.noreply.github.com> Date: Sun, 8 Jan 2023 09:33:14 -0500 Subject: [PATCH] Create README - LeetHub --- 4-median-of-two-sorted-arrays/README.md | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 4-median-of-two-sorted-arrays/README.md diff --git a/4-median-of-two-sorted-arrays/README.md b/4-median-of-two-sorted-arrays/README.md new file mode 100644 index 0000000..e547cad --- /dev/null +++ b/4-median-of-two-sorted-arrays/README.md @@ -0,0 +1,31 @@ +
Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.
The overall run time complexity should be O(log (m+n)).
+
Example 1:
+ +Input: nums1 = [1,3], nums2 = [2] +Output: 2.00000 +Explanation: merged array = [1,2,3] and median is 2. ++ +
Example 2:
+ +Input: nums1 = [1,2], nums2 = [3,4] +Output: 2.50000 +Explanation: merged array = [1,2,3,4] and median is (2 + 3) / 2 = 2.5. ++ +
+
Constraints:
+ +nums1.length == mnums2.length == n0 <= m <= 10000 <= n <= 10001 <= m + n <= 2000-106 <= nums1[i], nums2[i] <= 106