Skip to content

Quicksort doesn't sort in-place #303

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

Closed
0xbrayo opened this issue Apr 5, 2021 · 3 comments · Fixed by #325
Closed

Quicksort doesn't sort in-place #303

0xbrayo opened this issue Apr 5, 2021 · 3 comments · Fixed by #325
Labels

Comments

@0xbrayo
Copy link
Collaborator

0xbrayo commented Apr 5, 2021

Quicksort doesn't sort in place. I was studying algorithms the other day and decided to try and implement quicksort in go. It was apparent that implementing an in place sorting algorithm would be tedious involving pointers and pointer indirection, so I decided to check the one already implemented here. And it's implementation is incorrect. It's still close enough to quicksort but the additional work that goes on to combine slices adds an overhead that shouldn't be there with quicksort. I will make a PR to address this soon!

@stale
Copy link

stale bot commented Aug 21, 2021

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 21, 2021
@siriak
Copy link
Member

siriak commented Aug 21, 2021

Hi, could you add a PR number here? I'll gladly review it. I totally agree with you that this bug should be addressed.

@stale stale bot removed the stale label Aug 21, 2021
@stale stale bot removed the stale label Aug 21, 2021
@siriak siriak changed the title Quicksort implementation Quicksort doesn't sort in-place Aug 21, 2021
@tjgurwara99
Copy link
Member

tjgurwara99 commented Aug 22, 2021

@siriak I think the author has solved this in this a26459b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants