We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
书中提及说是O(max(m,n)),nums1、nums2都有序,但是不一定nums1中都小于或者大约nums2, 最坏情况下需要完全遍历nums1、nums2吧?那不是O(m+n)?
The text was updated successfully, but these errors were encountered:
@hitzhangjie 0004 是 Median of Two Sorted Arrays 这道题吧?我刚刚搜了一下,好像没找到你说的 O(max(m,n)),这道题的代码时间复杂度是 O(log min(m,n))),
Sorry, something went wrong.
奥,我描述的不清楚,是这里 合并有序数组的操作是 O(max(n,m)) 的,这里的合并应该是O(m+n)?
合并有序数组的操作是 O(max(n,m)) 的
@hitzhangjie 看到了你说的地方了。你说的是对的。我修改过来了。感谢指出!
No branches or pull requests
书中提及说是O(max(m,n)),nums1、nums2都有序,但是不一定nums1中都小于或者大约nums2,
最坏情况下需要完全遍历nums1、nums2吧?那不是O(m+n)?
The text was updated successfully, but these errors were encountered: