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
Because it's O (N ^ 2).
Theoretically, it is much slower than other algorithms, and the use case in performance test is just a special case of its speed.
The text was updated successfully, but these errors were encountered:
That is not true. Basically the loop looks like:
for(x || (x = 0); x < max_end; x++){ for(let y = x + 1; y < max_end; y++){ // this isn't O (N ^ 2) } }
Since y is starting from x this can't be O (N ^ 2)
y
x
Sorry, something went wrong.
Check https://stackoverflow.com/questions/362059/what-is-the-big-o-of-a-nested-loop-where-number-of-iterations-in-the-inner-loop, seems like @yisar is right on this one.
No branches or pull requests
Because it's O (N ^ 2).
Theoretically, it is much slower than other algorithms, and the use case in performance test is just a special case of its speed.
The text was updated successfully, but these errors were encountered: