pset 3 2017 walkthrough

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

David, thanks for this insightful edu vid. However, I need help with the functs in helpers. Naming the statements the right way. I can't get the proper name for the sort code. Here's a part. Not sure if I am doing this right:

void sort(int argv[], int straw)
{
// TODO: implement a sorting algorithm
//loop through all values
int indexMin, i, j;
for (int i = 0; i < MAX; i++)
{
//set current element as min
indexMin = i;

//check the element to be min
for (j = i+1; j < MAX; j++)
{
if (straw[j] < straw[indexMin])
{
indexMin = j;
}
}
if (indexMin != i)
{
//swap the values
int temp = straw[indexMin];
straw[indexMin] = straw[i];
straw[i] = temp;
}
}
return;

dylanmaulucci
Автор

Hello David, I find your code incredibly clear and so helpful. I'm struggling terribly w/recover in pset 4. Any chance you could do a walkthough video re: it?

lynnefields