n// return the index of the
smallest value
n// startIndex indicates the
starting element
nint smallestElement(int list[], int size, int
startIndex) {
n int
smallIndex = startIndex;
n
n for
(int i = startIndex + 1; i < size; i++) {
n if
(list[smallIndex] > list[i])
n smallIndex
= i;
n }
n return
smallIndex;
n}
n