100-shell_sort.cvoid shell_sort(int *array, size_t size);
sort an array of integers in ascending order using the shell sort algorithm, using the Knuth sequence
print the array each time you decrease the interval
because the complexity of the shell sort algorithm is dependent on the size of the array and the gap, big O notation will not be needed
n_(+1) = n * 3 + 1-> 1, 4, 13, 40, 121, ...
102-counting_sort.c,102-Ovoid counting_sort(int *array, size_t size);
sort an array of integers in ascending order using the counting sort algorithm
- assume
arraywill only contain numbers >= 0 malloc()andfree()are allowed- print the counting array once it is setup
- the array is of size
k + 1wherekis the largest number inarray
- the array is of size
- for
102-Owrite the big O notation of the time complexity for the best, average, and worst case scenarios -- one per line
103-merge_sort.c,103-Ovoid merge_sort(int *array, size_t size);
sort an array of integers in ascending order using the merge sort algorithm
- implement top-down merge sort
- when splitting an array into two, the length of the left array must be <= the length of the right array
- sort the left array before the right
printf()is allowedmalloc()andfree()can only be called once- for
103-Owrite the big O notation of the time complexity for the best, average, and worst case scenarios -- one per line