Last Updated: July 2026
Find the median of two sorted arrays.
nums1 and nums2 are both lists of integers.nums1 and nums2 are sorted in ascending order.nums1 and nums2 can be different.nums1 and nums2 can be zero (empty lists).nums1 and nums2 can be positive, negative, or zero.nums1 and nums2 can be duplicates.