Sorting Algorithms Explained Visually

preview_player
Показать описание
Implement 7 sorting algorithms with javascript and analyze their performance visually.

Рекомендации по теме
Комментарии
Автор

If you think Bogo sort is bad, you haven't heard of miracle sort. This works by checking if the array is sorted, if it's not: check again. You have to wait for some miracle to happen, so the memory is getting corrupted in some way.

Nanagos
Автор

Bogo sort is both the slowest and fastest sorting algorithm. Depending on your luck you can have it sorted at the first try or never, and me personally I like those chances

joseevb
Автор

The best algorithm I know is the Stalin sort. It simply removes the elements that are not in order. Not only is it an O(n) algorithm, but it also SAVES memory when you run it! It's really great!

maxijonson
Автор

Mistake at 4:08 where you say merge sort results in quadratic time when you're talking about selection sort

MattheousOfficial
Автор

My man out here being sponsored by jetbrains itself. Bravo man 👏🏻👏🏻👏🏻

regibyte
Автор

Algorithm timestamps:
1:37 - Bubble sort
2:33 - Insertion sort
3:32 - Selection sort
4:11 - Merge sort
5:26 - Quick sort
6:53 - Radix sort
7:54 - Bogo sort

anthonyhowell
Автор

You should have mentioned Quantum Bogo sort, splitting the universe into all possible combinations of the shuffled array and destroying every universe where its not sorted. It has an O(1) time making it the best sorting algorithm

BrokenBuildings
Автор

You should have covered quantum bogosort:

1. Use some quantum source of randomness (e.g. radioactive decay) to shuffle the list. If we assume that the many-worlds interpretation of quantum mechanics is true this will result in one universe for every possible list order.
2. If the list is not sorted, destroy the universe (this is left as an exercise to the reader).
3. The only surviving universe is one in which the list is sorted.

This sort is not stable, but this problem can be easily fixed: just use the same randomness source to generate random source code and destroy the universe if the generated code is not a stable quantum bogosort.

JSorngard
Автор

Job interviewers should understand the last line of this video.
"So basically, everything you learned in this video is useless on a practical level"

avaneeshc
Автор

I like quantumsort. It does nothing but check to see if quantum fluctuations have caused your data to spontaneously sort itself

StrangeGamer
Автор

This is like learning the most boring topics in the form of a kindergarten musical math lesson. Absolutely loved it !

developerpranav
Автор

It's funny how my window screen hasn't loaded yet and there's your voice. Thanks for sharing.

diegoalvarez
Автор

It's also worth considering how data might be added to the array causing a need to re-sort. If data is rarely changed, the sort algorithm doesn't need to be most efficient. If data is regularly added or removed, how it's added/removed can be important combined with the sorting algorithm.

jasonphilbrook
Автор

I made little markdown explanations in Obsidian for most of these algorithms because our professor had a very questionable teaching method that resulted in like 60% of students confused and clueless.

Shoutout to the big brains behind mermaidJS, I wouldn't be able to explain merge sort without your graphs!

noid
Автор

I think radix sort does extremely well when the input data is massive, like 10M+ values.

holdthat
Автор

In pandemic i viewed a LOT of sorting videos, they are mesmerizing in their own way.

hugazo
Автор

wow, my favourite programming youtuber shows videos my buddy from university made a decade ago - never expected that 🎉

andreasmahler
Автор

Interesting, but which array method will help me center this div?

alexjones
Автор

Creel's multi part series on sorting algorithms was really excellent and gave a lot of great details, but this was a nice and condense video!

DrakiniteOfficial
Автор

Radix Sort, doesn't split in buckets of 10, the general meta is to use a base of 256 and there are two implementations, one with buckets and one with counting, I recommend creel's video on the topic, it's really descriptive.

professornumbskull
visit shbcf.ru