Given two sorted arrays nums1 and nums2, return the median of the two sorted arrays in O(log(m+n)) time.
Input: nums1=[1,3], nums2=[2] Output: 2.0 Input: nums1=[1,2], nums2=[3,4] Output: 2.5
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
to save progress and use AI features