
#ifndef _bubblesort_h
#define _bubblesort_h

// This file defines the interface of the generic sorting function bubble_sort.

#include <stddef.h>  // for size_t

/* This generic function can sort an array of any single type of data.  arr is a pointer to
 * the first element of the array with n elements each elem_size_bytes big.  cmp_fn is
 * a comparison function that should be able to take in pointers to two elements in the
 * array and return 0 if they should be considered equal, < 0 if the first should be considered
 * to come before the second, or > 0 if the first should be considered to come after the second.
 */
void bubble_sort(void *arr, size_t n, size_t elem_size_bytes, int (*cmp_fn)(void *, void *));

#endif