4 ms·
>> What is the most beautiful algorithm? > Quicksort Algorithm Definitive proof that AI must be stopped. Ranking quicksort as more elegant than heapsort?!
by kibwen 3y ago
>> What is the most beautiful algorithm?
> Quicksort Algorithm
Definitive proof that AI must be stopped. Ranking quicksort as more elegant than heapsort?!
- bee_rider 3y agoThat is a weird way of spelling mergesort.
- web3-is-a-scam 3y agoThat is a weird way of spelling Bogo Sort.
- cratermoon 3y agoYou typo'd Sleep Sort
- scoot 3y ago"Mistyped". "Typographical error" ("typo") isn't a verb.
- cratermoon 3y agohttps://en.wiktionary.org/wiki/typo#Verb https://en.wiktionary.org/wiki/typo#Verb
- hannasm 3y agoI believe radix sort belongs first in this list.
- beanaroo 3y agoThe most elegant is certainly sleepsort. Maybe not the most efficient, but definitely elegant.
- klyrs 3y agoYou've never heard of quantum bogosort, then. It's stable and linear time in the right universe, and much more elegant than sleeping.
- david-gpu 3y ago¿Por qué no los dos? Due to the inherent unpredictability and lack of scheduling guarantees of sleep on most OSes, it is likely that sleepsort won't work in the first try. Append a check for order and a retry loop when the solution is incorrect and now you have a production-ready sort. A sleepbogosort I declare this my new favorite sorting algorithm. Also, where is your god now?
- klyrs 3y ago> where is your god now? In a happier timeline, I hope.
- wahahah 3y agorest in peace /prog/ https://news.ycombinator.com/item?id=2657277 https://news.ycombinator.com/item?id=2657277 [edit] took me a minute to find an archive https://archive.tinychan.net/read/prog/1295544154 https://archive.tinychan.net/read/prog/1295544154
- bee_rider 3y agoPerformance-wise, maybe, but mergesort is clearly the most elegant/beautiful sorting algorithm. Nothing tricky going on, just a couple sorted lists being merged. Plus everyone loves a stable sort.
- Rebelgecko 3y agoSleepsort is the most elegant & efficient sorting algorithm
- dkersten 3y agoSleepsort just pushes the sorting task to the task scheduler, which uses sone other algorithm to do the sorting.
- Rebelgecko 3y agoThat's what makes it the best, it automatically improves as OS's implement more efficient algos
- boosteri 3y agoBeauty is in the eye of the beholder. I look no further than bubble sort -- it is simple enough I can recite it straight away should someone wake me up at modnight.
- spiorf 3y agoBubblesort is the bestsort.
- 0xBA5ED 3y agoWell there is something rather satisfying about partitioning.