Counting Sort Algorithm Tutorial

preview_player
Показать описание
This video walks through a visualization for the counting sort algorithm. Counting sort is a unique algorithm that is not typically used by itself to sort data, instead it is usually utilized as a subroutine for algorithms such as Radix sort. This algorithm is not the most intuitive for many students, so it may be helpful to watch the visualization several times until you understand how the values get sorted.
Рекомендации по теме
Комментарии
Автор

An important omission in this video is the explanation that you do a decrement of the value in the middle array before you use it as an index in the final array. A critical aspect of this algorithm.  A very nicely done video, otherwise.

YouTubist
Автор

Thank you so much, I spend a lot of time trying to figure it out, I could not have figured it out without this! I really appreciate this.

shikhamehta
Автор

this was really clear and helpful, thank you! :)

BiaBerrish
Автор

Thanks alot man...this is my fifth tutorial, finally i understood counting sort,
was having difficulty understanding the 3rd step,
your animation tutorial helped :-)

varunsingh
Автор

Thank you so much... the video is very understandable. Just by watching the video we can write think that how the code can be written. It very simple that other sorting algorithms I've read.

JayKumar-tzrn
Автор

Perfect! I understood it at the first try. Thanks :)

doxorn
Автор

excellent visualize, it helped in understanding concept easily.

sanjeevacham
Автор

What's the purpose of adding the elements up in the middle array (right before the 4 minute mark)

FareezAhmed
Автор

What he didn't explain is that the element of array 2 is decremented every time before inserting into the sorted array 3.

emilwrisberg
Автор

Whats the name of this visualization program?

DorianQose
Автор

what happens if the element in your array is larger than the number of elements in your original array. Example <9, 2, 4, 7, 2, 7, 1> so there are 6 elements in the array but you have 9 as the largest element value

katlee
Автор

It's amazing that there are no collisions.

ThuyNguyen-Tiffastic
Автор

Really Helpful, Do have video of Program Implementation and going thru step by step ?

falakk
Автор

Good tutorial, even though decrement was not mentioned i figured that out by taking a second look. Nice!

LudwigvanBeethoven
Автор

The stored value in the middle array(not the index, is decremented each time it is moved to the last array) you failed to explain this.

scotchmacdonald
Автор

There's something that I want to know. Let's say I have an array of 10 unsigned integers (just as an example) on wich the minimum is 0 annd the max is 1000. Even if I don't have too much experience in programming, making a 1000 (the max mentionned) buffer array just to have the indexes doesn't seem really a good programming method. If there's another way to allocate memory in a better way, I would be glad to know it, but if not, I'll pass counting sort.

amecarethqc
Автор

nice one .decrement of value in second array could have been clear...thanks a lot..

venkatcsc
Автор

THANKS! :)) I'll be using this in my report is it okay ? :))

MaFatimaEBelara
Автор

Improvement: You can reduce the number of arrays from 3 to 2 and remove an entire loop completely. Try and work it out ;-)

kevg
Автор

Why is the comment section filled with beautiful women for this type of video?

tyty