void selection_sort(BYTE data[], int n) {
for (int i = 0; i < n - 1; i++) {
int jmin = i;
for (int j = i + 1; j < n; j++)
if (data[j] < data[jmin]) jmin = j;
if (jmin != i) SWAP(data[jmin], data[i]);
}
}
728x90
'Image Recognition > Fundamental' 카테고리의 다른 글
Grassfire Algorithm (0) | 2021.03.05 |
---|---|
Image Sharpness (0) | 2021.02.25 |
Bubble Sort (0) | 2021.02.24 |
Insertion Sort (0) | 2021.02.24 |
Optimized Median Search (0) | 2021.02.24 |