missing counting changes
This commit is contained in:
parent
e13b9a9dd3
commit
89cd51e84c
@ -353,8 +353,8 @@ int main (int argc, char **argv) {
|
|||||||
|
|
||||||
// O((1/2) * n^2 - (1/2) * n)
|
// O((1/2) * n^2 - (1/2) * n)
|
||||||
if (counting) {
|
if (counting) {
|
||||||
start_sort("Count sort corriendo... ", n);
|
start_sort("Counting sort corriendo... ", n);
|
||||||
count_sort(work_array, n);
|
counting_sort(work_array, n);
|
||||||
end_sort();
|
end_sort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ int main(int argc, char **argv) {
|
|||||||
memcpy(test_array, test_case, sizeof(int) * n);
|
memcpy(test_array, test_case, sizeof(int) * n);
|
||||||
fprintf(stdout, "\tcounting sort: ");
|
fprintf(stdout, "\tcounting sort: ");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
count_sort(test_array, n);
|
counting_sort(test_array, n);
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
if (test_array[i] != qarray[i]) {
|
if (test_array[i] != qarray[i]) {
|
||||||
fprintf(stdout, "fail\n");
|
fprintf(stdout, "fail\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user