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

Fixed QuickSort algorithm. Added tests for QuickSort #114

Closed
wants to merge 1 commit into from
Closed

Fixed QuickSort algorithm. Added tests for QuickSort #114

wants to merge 1 commit into from

Conversation

n0an
Copy link

@n0an n0an commented Dec 1, 2017

I've fixed implementation of QuickSort. New implementation ensures O(n log n) complexity for case when array contains duplicates.
Old realisation provided quadratic time for such cases.
I've added tests to check QuickSort with different cases - with duplicates, with different array sized, already sorted array.

I've fixed implementation of QuickSort. New implementation ensures O(n log n) complexity for case when array contains duplicates.
Old realisation provided quadratic time for such cases.
I've added tests to check QuickSort with different cases - with duplicates, with different array sized, already sorted array.
@waynewbishop
Copy link
Owner

Hi @n0an, thanks for sending this pull request! I'm considering providing a book update later this month these updates to QuickSort would be great to add. Thanks for sharing.

@n0an n0an closed this Jan 27, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants