the video does note move the first element in each iteration to the correct position (min element). For me this looks like that you create a second array where you incrementally insert the min element.
I think this whole series is so creative and plainly excellent. Now I understand all the tricks in 3 minutes, compared reading confusing texts for hour!
Hm, I always thought Selection Sort was done in-place (usually). If cards are removed from the top list (assuming it's an array), how would you indicate that something has been removed? I mean, we have to keep passing over the list multiple times, and you can skip the "gaps" with your fingers, but what value could we put into an array that indicates "this one has been removed, please skip it?"
Nicely done. The only thing I think that would make this complete is if you showed exactly how the element values in the array are swapped. Cheers mate!
This comment has received too many negative votesshow
I don't get what all the fuss is about.... why don't you just say, put all the cards in order, biggest to smallest (Ace being smallest and 9 being the biggest)
@BkBlu45 Yes, and it would be wonderful if a computer could understand those instructions, but they don't and you have to program the computer in excruciating detail exactly how to sort the cards (or at least someone does and you use their library)
@BkBlu45 This would defeat the purpose of the video. However, your question is fair enough. There are different ways of "putting the cards in order, biggest to smallest." Why is this important? Because some ways are faster than others. Lets say that instead of doing this method I check each two adjacent cards and if the first is bigger than the second I swap them and check the next two cards, etc.. I will have to do this many many times before all my cards are sorted. Method is important.
This version you show here need to double the memory space, one array as the original, one array as the sorted result. The version I did learn didn't need extra memory.
Great sorting videos with playing cards, I like them all. But this video should be called "Selection sort".
I think Selection sort have at least one advantage over Insertion sort, and it's doing the minimum "swap" to sort the entire list or array. Because swaping cost more than comparing, Selection sort is better.
There still other popular sorting algorithms like shell sort, heap sort, and quick sort. Will you explain them too with playing cards?
@newcoleco there is no such thing as the best sorting algorithm. It all depends on the circumstances.
For instance: it would be quite a waste to apply selection sort to a list of data that already is more or less sorted, because it would take just as much time as if it were ordered randomly.
yeah basically in code form this would be the equivalent of creating another array to store the sorted items
evanmthw 2 weeks ago
the video does note move the first element in each iteration to the correct position (min element). For me this looks like that you create a second array where you incrementally insert the min element.
markusinn77 1 month ago
yes this helped me understand it, now how do i put it in my program =/
purefatdude2 2 months ago
It helped with class!
joerob89 4 months ago
where is the swap/exchange ?? :O
cyberaqib 5 months ago 2
Comment removed
cyberaqib 5 months ago
If you use first element as the pivot and find the minimum or maximum value? Would be great if you could show this with the cards? Thanks
AJSwisgirl 7 months ago
@1nglewattz1 it's "ur" not "your" duhhhhhhhh
BrothersFreedive 8 months ago
I think this whole series is so creative and plainly excellent. Now I understand all the tricks in 3 minutes, compared reading confusing texts for hour!
Good job.
stb6688 9 months ago
Hm, I always thought Selection Sort was done in-place (usually). If cards are removed from the top list (assuming it's an array), how would you indicate that something has been removed? I mean, we have to keep passing over the list multiple times, and you can skip the "gaps" with your fingers, but what value could we put into an array that indicates "this one has been removed, please skip it?"
KIFulgore 9 months ago
This has been flagged as spam show
very good explanation!
johnxxx9 9 months ago
This is misleading. It gives the impression that a new array is being built while in reality there is a swap between array elements.
pithikoulis 11 months ago 6
This has been flagged as spam show
Time to stop crying try Naughty women benaughtyman.info
sasanthinirmani1 1 year ago
This has been flagged as spam show
My name is Mike from LA Although there busizz4me.info
consuelahuttonc 1 year ago
e gusto professore
mbelalbarki 1 year ago
Possibly the most helpful video on algorithms I've ever seen. Great job once again
Mesmereyes 1 year ago
Thanks !
AuiCsc 1 year ago
So nicely explained... I like it..
naeem0akram0malik 1 year ago
Nicely done. The only thing I think that would make this complete is if you showed exactly how the element values in the array are swapped. Cheers mate!
brettbed 1 year ago
This comment has received too many negative votes show
I don't get what all the fuss is about.... why don't you just say, put all the cards in order, biggest to smallest (Ace being smallest and 9 being the biggest)
someone enlighten me
BkBlu45 2 years ago
@BkBlu45 Yes, and it would be wonderful if a computer could understand those instructions, but they don't and you have to program the computer in excruciating detail exactly how to sort the cards (or at least someone does and you use their library)
codegearguru 2 years ago 24
@BkBlu45 This would defeat the purpose of the video. However, your question is fair enough. There are different ways of "putting the cards in order, biggest to smallest." Why is this important? Because some ways are faster than others. Lets say that instead of doing this method I check each two adjacent cards and if the first is bigger than the second I swap them and check the next two cards, etc.. I will have to do this many many times before all my cards are sorted. Method is important.
fatimanuelology 8 months ago
thanks,. thats gr8,. u made me understand finally
imvjhere 2 years ago
Your an awesome teacher!
1nglewattz1 2 years ago 15
thank you, your videos are really helpful, I also would like you to prepare a video for quick sort if that possible.. thanks..
qwe11cem 2 years ago 3
Are you Australian by any chance?
vorten 2 years ago
Any more posts on the sorting.. ? Thanks for the 3 posts... never occured for me to explain someone sorting with cards.. thanks..
adityaadepu 2 years ago
best video on selection sort.
Thank You.
Ciwan2 2 years ago
Nice
Lolluthegreat 2 years ago
great vid...
thanx.keep going..
smidhunraj 3 years ago
This version you show here need to double the memory space, one array as the original, one array as the sorted result. The version I did learn didn't need extra memory.
newcoleco 3 years ago
@newcoleco While it does require more momery, this variation has the advantage of making the sort stable. (swapping variation is not stable)
gertvanderpaelt 1 year ago
Hello Alister :)
destropol 3 years ago
Great sorting videos with playing cards, I like them all. But this video should be called "Selection sort".
I think Selection sort have at least one advantage over Insertion sort, and it's doing the minimum "swap" to sort the entire list or array. Because swaping cost more than comparing, Selection sort is better.
There still other popular sorting algorithms like shell sort, heap sort, and quick sort. Will you explain them too with playing cards?
newcoleco 3 years ago
Oops, thanks newcoleco your right, I have updated the title and description - not sure how i missed this one.
codegearguru 3 years ago
@newcoleco there is no such thing as the best sorting algorithm. It all depends on the circumstances.
For instance: it would be quite a waste to apply selection sort to a list of data that already is more or less sorted, because it would take just as much time as if it were ordered randomly.
gertvanderpaelt 1 year ago