Find Median of Two Sorted Arrays

00:00
HardArrayBinary SearchDivide & Conquer
GoogleFacebook

Find the median of two sorted arrays. O(log(m+n)) required.

Examples

Input → [1,3],[2]
Output → 2.0
Input → [1,2],[3,4]
Output → 2.5
Input → [],[1]
Output → 1.0