Exercises/#65 Median of Two Sorted Arrays
#65

Median of Two Sorted Arrays

HardπŸ” Sorting & Searching
140 XP

Problem

Given two sorted arrays nums1 and nums2, return the median of the two sorted arrays in O(log(m+n)) time.

Examples

Input: nums1=[1,3], nums2=[2]
Output: 2.0

Input: nums1=[1,2], nums2=[3,4]
Output: 2.5
binary-searchdivide-conquer
AI Assistantβ€” powered by AI

Unlock hints progressively β€” start gentle, go deeper only if needed.

πŸ’‘

Level 1: Gentle Nudge

A subtle direction

πŸ—ΊοΈ

Level 2: Approach

The algorithm to use

πŸ”

Level 3: Detailed

Step-by-step guidance

65 / 150

Your Solution

⚑ JavaScript

to save progress and use AI features