Backend Engineering
Senior
programming
LeetCode #295 - Find Median from Data Stream
You are given two sorted arrays, nums1 and nums2, of size m and n respectively. Your task is to find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Input:
Output:
Constraints:
- nums1: array of integers
- nums2: array of integers
Output:
- median of the two sorted arrays
Constraints:
- 0 <= nums1.length, nums2.length <= 1000
- -10^6 <= nums1[i], nums2[i] <= 10^6
Suggested Answer