Live Batches
Masterclasses
Menu
Free Courses
Account
Login / Sign Up
Problem Submissions Solution

Median Of Two Sorted Arrays

Difficulty: Medium

Acceptance: 71.00%

Points: 30.00

You are given two sorted arrays nums1[] and nums2[] of sizes m and n. Your task is to find the median of the two sorted arrays. The median is the middle element when all elements from both arrays are combined and arranged in sorted order. If the total number of elements is even, the median is the average of the two middle elements.

Topics

Companies

Articles

Examples:

N/A

Constraints:
  • 0 = m, n = 1000
  • 1 = m + n = 2000
  • -106 = nums1[i], nums2[i] = 106
Companies:
Amazon
Topics:
Binary Search
Locked Content
Access Restricted: Please Login to access the code editor and test cases.