Median of 2 Sorted Arrays in Log Time

The crux of this problem is finding what two arrays would look like when they are merged, without actually merging them since this would take O(n+m) time. - medium

caption

caption

Written on April 11, 2021, Last update on February 4, 2023
algorithm median array merge sort complexity puzzle