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

So 3, 4, 5, 6, 7, 8 and 9 are out of order in this array? [1, 2, 50, 3, 4, 5, 6, 7, 8, 9] #148

Open
taylankasap opened this issue Jul 12, 2020 · 3 comments

Comments

@taylankasap
Copy link

Any element which is out of order is eliminated

The 50 is the asshole here, why did the others have to die? Whyyy god whyy?

@gaburielcasado
Copy link
Contributor

gaburielcasado commented Jul 13, 2020

It's a subtle representation of how the many isms of the world and its tyrannical enforcers toy with human beings by subjecting them to arbitrary rules that ultimately result in senseless suffering.

@Mem2019
Copy link

Mem2019 commented Mar 4, 2021

Indeed, if we have largest element at the beginning, any other elements will be removed. The approach to tackle such worst case condition is to randomly shuffle the array before using Stalin sort, which still gives O(n).

@ChrisHodges
Copy link

Listen lads, the 50 was obviously in that position for a good reason. If you think the Supreme Soviet might have made a mistake then by all means queue up in that line over there. Don't worry about the order.

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

4 participants