Function qsort_rec

Function Documentation

void qsort_rec(void *a, int min_index, int max_index, size_t el_size, int (*cmpe)(const void *const e1, const void *const e2))

Sort an array using quicksort.

This routine sorts an array by using a recursive implementation of quicksort, rather than an iterative one, so some efficiency is lost.

Parameters:
  • a – The input array

  • min_index – Starting index

  • max_index – Ending index

  • el_size – Size of elements in bytes

  • cmpe – Comparision function for elements