Array
4. Median of Two Sorted Arrays
Merging the two arrays and taking the middle is O(m+n) and dead simple — and it's exactly what the problem forbids. The log-time solution needs a different mental model: stop hunting for an element,…
Loading…
Merging the two arrays and taking the middle is O(m+n) and dead simple — and it's exactly what the problem forbids. The log-time solution needs a different mental model: stop hunting for an element,…
Loading…