void insertion_sort ( BYTE *data, int n ) {
int j;
for (int i = 1; i < n; i++ ) {
BYTE remember = data[(j = i)];
while ( --j >= 0 && remember < data[j] ) {
data[j + 1] = data[j];
data[j] = remember;
}
}
}
728x90
'Image Recognition > Fundamental' 카테고리의 다른 글
Selection Sort (0) | 2021.02.25 |
---|---|
Bubble Sort (0) | 2021.02.24 |
Optimized Median Search (0) | 2021.02.24 |
Zhang-Suen Thinning Algorithm (0) | 2021.02.18 |
Is Power of 2 (0) | 2021.02.12 |