Selection Sort | C Programming Example

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Excellent explanation. Thanks for putting this together.

JasonGriffing
Автор

this could've saved me from severe depression of getting a bad quiz. it clicked because of your explaination!

icyclestick
Автор

I wish I found out about this channel earlier. It could have saved me a lot of time. Thank you❤❤.

kimosabe_the_first
Автор

Beautiful channel to learn C language, thank u so much sir, i have learnt many things from your channel..❤❤❤❤

manojs
Автор

thank you! your explanation is very easy to understand.

romeiyu
Автор

Wish i saw this before my exams, you explained it so well.

chrxnic_vxnity
Автор

Very good and funny videos bring a great sense of entertainment!

drjjzfd
Автор

Question im having trouble wrapping my head around the use of temp variable and reassigning a[min_pos] = temp, when does that get placed, or swapped back into the array

danil
Автор

awesome video! but can you explain at 5:54 im not sure i understood that, can we do it without that line of code?

mongraal
Автор

Everything was going on well until (length - 1). Shouldn't it just be (i < length) since the loop will run from i = 0 to i = 9. I think if it runs to (i < length - 1) its literally running till (i = 8) and not (i = 9). Somebody please help me

Am_Elijah
Автор

sir, appreciate your time and teaching style, just had a question, after the first for loop, you write int min_pos =i; i dont't get it, is this i the same i as in the loop ? how do we tell the program that asuume the first position in the unsorted area is the minimum one...

kasra
Автор

How about linked list representation of this linked list? do you have

franciscrypto
Автор

i always have a hard time understanding this kinds of things cause i always forget which loop is executing and when it stops executing and muck it up by thinking once it finds a less than the previous number i is incremented leaving hence making it worthless and leaving me with the worst headache of today. gotta remember the nested loops man. but i gotta say my brain was not meant to follow through loops like this without quickly getting disoriented. thanks anyways

drcdqdy
Автор

svaka tebi cas, bolji si od ovih asisestenata na fakultetu

necko
Автор

Nice...do You have a master or phd in computer science?

jonjones
Автор

i understand the concept but not sure how to use it in my own code would this also work?





Written in C. I.E.
a[] = {5, 2, 7, 4, 1, 6, 3, 0};

for (int i = 0; i < 8 -1; i++)
{
int temporaryV = a[ i ];

for ( int j = i + 1; j < i; j++)
{
if ( a[ j ] < temporaryV)
{
temporaryV = a[ j ];
a[ j ] = temporayV;
}
}
}

YoIntangible
Автор

hello, I still didn't get the last step. Can you explain it pls

sarahsarahhh
Автор

I don't understand why we need 9 iterations instead of 10 for the outer for loop

ionguzun
Автор

Hm... but why in the second loop it's 'length' and not 'length-1'?

enyakot
Автор

This code is not giving me a sorted array

thabisombingo