Browse Source

missing counting changes

tags/1.0.0
Chris Cromer 1 year ago
parent
commit
89cd51e84c
Signed by: cromer <chris@cromer.cl> GPG Key ID: 39CC813FF3C8708A
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      src/sort.c
  2. +1
    -1
      test/test.c

+ 2
- 2
src/sort.c View File

@@ -353,8 +353,8 @@ int main (int argc, char **argv) {

// O((1/2) * n^2 - (1/2) * n)
if (counting) {
start_sort("Count sort corriendo... ", n);
count_sort(work_array, n);
start_sort("Counting sort corriendo... ", n);
counting_sort(work_array, n);
end_sort();
}



+ 1
- 1
test/test.c View File

@@ -129,7 +129,7 @@ int main(int argc, char **argv) {
memcpy(test_array, test_case, sizeof(int) * n);
fprintf(stdout, "\tcounting sort: ");
fflush(stdout);
count_sort(test_array, n);
counting_sort(test_array, n);
for (i = 0; i < n; i++) {
if (test_array[i] != qarray[i]) {
fprintf(stdout, "fail\n");


Loading…
Cancel
Save