Implementation Criticisms:
// Shaker Sort in C
int shakerSort(int arr[1000]) {
int i = 0, n = 1000, swaps = 0;
while (i < n) {
for (int j = i + 1; j < n; j++) {
if (arr[j] < arr[i]) {
int temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
swaps++;
}
}
i++;
}
return swaps;
}
This code is a mess. It's a mess of design criticisms just waiting to happen.