We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2d67f0 commit 098edd5Copy full SHA for 098edd5
sorting/slow_sort.c
@@ -1,6 +1,7 @@
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <time.h>
4
+#include <assert.h>
5
6
/*Displays array passed as parameter*/
7
void display(int arr[], int size)
@@ -57,6 +58,11 @@ void test()
57
58
59
slowsort(arr, 0, size-1);
60
61
+ for (int i = 0; i < size - 1; i++)
62
+ {
63
+ assert(arr[i] <= arr[i+1]);
64
+ }
65
+
66
display(arr, size);
67
68
free(arr);
0 commit comments