Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I'll call it:
Guess Sort/ Throw Dice Sort Algo: you either get part of sorted result or you get nothing -
@magicMirror That would be deleting the whole list. It would even be in O(1), quite an improvement.
-
@Fast-Nop AFAIK - thats the worst (best?) case scenario for this sort. hence the name.
-
This sorting algorithm is EXTREMELY common.
You might be surprised. It's what people tend to do when for example in distributed or concurrent systems or something things get consumed out of order.
Just ignore the thing with the missing dependency.
It's also an example of eventual consistency so now you know what it means at last, the moment you've been waiting for. -
@Gregozor2121 Please let that be sarcasm, and if it is, please make it clear. The tag *is* wrong, but when you mix truth and sarcasm, it looks rude. Even if it is an old joke, it's never ok to boo somebody for that unless it's spam, in which case it should be reported as such, and almost never ok to tell somebody they suck unless it's clearly a joke (even then, it's borderline)
-
We need to raise a petition to rename Stalin-sort to Yeet-sort, the name is just much much better
-
@sploders101 And even if, it's completely OK to tell someone when he did stupid shit, and to call him a shithead if he does so repeatedly. Actually, not doing so causes harm in the long run.
-
@Fast-Nop I can point several examples where it is wrong...
*Looking at my parents*
I think the anwser you are looking for is: It fucking depends.
A new linear time O(N) sorting algorithm [Keep it secret 🔒]
* Compare two adjacent elements one by one starting from the first element
* If there are out of order, delete the second element and continue with step 1
* If in order, go to the next two elements
* Once done, act like the numbers you deleted never existed
Works all the time.
Not yet published. Thinking of a good name for it.
rant