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

README.md - Quicksort average case performance #245

Closed
antfitch opened this issue Jan 29, 2018 · 5 comments
Closed

README.md - Quicksort average case performance #245

antfitch opened this issue Jan 29, 2018 · 5 comments

Comments

@antfitch
Copy link
Contributor

Readme says average case performance for quicksort is 0(n^2), but elsewhere, this is O(n log n).
https://en.wikipedia.org/wiki/Quicksort

Is this a bug in the docs? Or is average case performance for the version of quicksort in this repo actually O(n^2)?

@harshildarji
Copy link
Member

I hope that screenshot below will clear your doubts:

capture

If you have any improved script for QuickSort, Your contribution is welcomed.

@antfitch
Copy link
Contributor Author

Hello harshildarji, my comment was for average case, not best case. Average case is usually O(n log n) not O(n^2) for this alg.

@harshildarji
Copy link
Member

@antfitch My bad, I’ll check and correct it within next 24 hours (or you can just do a PR with the corrections, I’ll immediately merge it).

@antfitch
Copy link
Contributor Author

No worries and cool. I added a PR.

@harshildarji
Copy link
Member

@antfitch Done!

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

2 participants