Can we sort elements without comparing them? (Counting sort) - Inside code

preview_player
Показать описание

NB: This video is ad-free, you can choose to support Inside code by purchasing one of the courses above or dropping a super thanks!
NB2: Discounts of courses above are permanent

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

In uni, we got the assignment to find the best sorting algorithm to sort a million elements. At first I thought it was counting sort and it did well up to half a million elements but after that it became way too slow. Same for radix sort, which worked well for most students. The one that did it for me was pigeonhole sort. (The highest number of values I tested was 100 million)
Interesting little story I hope. :P

TheDarkOne
Автор

Doesn't the max() and min() function involve comparing all values in the array?

Ninvus
Автор

00:10 this seems to me like a misleading visualization of insertion sort because it shows a swap being done on each iteration. As far as I know, the implementation involves storing the first unsorted element in a temp, copying the greater values in the unsorted half to the right, and only as a final step is putting the temp value back into the array.

ctcrnitv
Автор

I have only taken an introduction to computer logic, and have not learned any language yet in particular, so I know I can translate every one of these commands to any language using the corresponding syntax, so my question is, whether this is your version of pseudo code or is this actual syntax for a particular language and if so, what language.

jsjnumbers
Автор

what if we want to get the median of some data with counting sort by using the count array, not the arr?
can we possibly do that?
i was figuring it out....

hyper
Автор

How does it get min and max without comparing?

RandomGeometryDashStuff
Автор

i appreciate the effort but i stil didnt get it can you use a different voiceover for it please

parthmakode
welcome to shbcf.ru