Find median of two sorted arrays
by galaxy_alchemy208
Stripe
senior
coding
medium
rejected
1
110
I approached the problem by first outlining the requirement to find the median of two sorted arrays. I mentioned the O(log(min(n, m))) optimal solution using binary search but initially proposed a simpler O(n + m) approach, merging the arrays. The interviewer guided me toward more efficient methods, appreciating my thought process but pushing for better performance. We discussed edge cases, notably when array lengths differ, and I stumbled slightly in articulating the edge conditions clearly, which the interviewer picked up on, suggesting I refine my explanation.
Markdown supported