Skip to content
New issue

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

定一个整数sum,从有N个无序元素的数组中寻找元素a、b、c、d,使得 a+b+c+d =sum,最快的平均时间复杂度是____。 #78

Open
waylau opened this issue Jul 23, 2020 · 0 comments

Comments

@waylau
Copy link
Owner

waylau commented Jul 23, 2020

定一个整数sum,从有N个无序元素的数组中寻找元素a、b、c、d,使得 a+b+c+d =sum,最快的平均时间复杂度是____。(2分)

A. O(N^2)
B. O(log N)
C. O(N)
D. O(N^3)
E. O(N^2LogN)
F. O(N^4)

你的回答C ,是错误的。应是A

@waylau waylau closed this as completed Jul 23, 2020
@waylau waylau reopened this Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant