Sale
Summer Offer: $190/yr $99/yr
00 : 00 : 00 : 00
Get this deal
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:
  • 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

Trusted by 100+ professionals preparing for interviews

Trusted by 100+ professionals 50+ Company Question Banks 5+ Supported Languages

Practice More Questions Like This

Generate unlimited interview questions with structured answers, code runner, and AI-powered walkthroughs.

Get Started Free

More Backend Engineering Interview Prep

Describe a time when you had to make a trade-off between technical debt and delivering a feature on time. How did you handle it?
Backend Engineering · Senior
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Link copied to clipboard