Median of Two Sorted Arrays

Hard

📝 Description

Find median of two sorted arrays in O(log(min(m,n))) time

Input Format

First line: space-separated array1 Second line: space-separated array2

Output Format

Median value

Constraints

0 ≤ nums1.length, nums2.length ≤ 1000

🔍 Sample Input

1 3
2
            

✅ Sample Output

2.0
            

Code Editor

Please login to run and submit code.

Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run