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

The shatter sorting cannot sort correctly in random input #115

Open
pystraf opened this issue Aug 18, 2024 · 6 comments
Open

The shatter sorting cannot sort correctly in random input #115

pystraf opened this issue Aug 18, 2024 · 6 comments

Comments

@pystraf
Copy link

pystraf commented Aug 18, 2024

The shatter sorting cannot sort correctly in random input.
But the simple shatter sorting and the immediate shatter sorting can.

@pystraf
Copy link
Author

pystraf commented Aug 18, 2024

The video:

202408181416.mp4

@pystraf
Copy link
Author

pystraf commented Aug 20, 2024

The index sort is incorrect, too.
I recommend to remove them.

@pystraf
Copy link
Author

pystraf commented Aug 20, 2024

But I think the pattern after shatter sorting is quite beautiful

@thatsOven
Copy link
Collaborator

shatter sort and index sort both assume the array is composed of elements from a linear distribution, and they break if they don't find such a distribution. they're not broken, they just operate on specific kinds of inputs

@pystraf
Copy link
Author

pystraf commented Aug 21, 2024

the circle merge sorting also cannot work correctly when the array length is not 2^k.

202408211931.mp4

@pystraf
Copy link
Author

pystraf commented Aug 25, 2024

@Gaming32 @thatsOven

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