


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



void Sort (int list[ ] ) int list[] = {5, 3, 7, 4, 6}; { int minIndex, temp; for (int i = 0; i <= n - 2; i++) { minIndex = i; for (int j = i + 1; j <= n-1; j++) if (list[j] < list[minIndex]) minIndex = j; if (minIndex != i) { temp = list[i]; list[i] = list[minIndex]; list[minIndex] = temp; } } }
4. List and discuss notations used to describe a running time function(2pt)