I think the tricky part with that specific problem is that it asks you to do it in O(log(m+n)) complexity, so you can't even iterate through the two arrays to see all of the values -- you need to do some binary-search-like thing across both of the arrays. In O(m+n) complexity, yeah you could combine the arrays and then find the median of the combined array, which is much simpler. This is actually a great example of why those questions are so hard!