-
Notifications
You must be signed in to change notification settings - Fork 166
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
bubble sort is wrong #89
Comments
Can you please link the file saying which code is wrong? Is it wrong in all languages? You can open a PR after making a fix. |
The bubble sort is wrong in every language. The time complexity of your code is always n^2, the best case should be n. There is an optimization missing. |
arathyrose
added a commit
to arathyrose/Sorting-Algorithms
that referenced
this issue
Oct 31, 2019
…the inner loop does not swap any element
Merged
arathyrose
added a commit
to arathyrose/Sorting-Algorithms
that referenced
this issue
Oct 31, 2019
…f the inner loop does not swap any element
Merged
I developed the code to be more clear. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bubble sort is wrong, the time complexity is always n^2
The text was updated successfully, but these errors were encountered: