Here is the scenario:

```
void quicksort(void *data, size_t size);
void mergesort(void *data, size_t size);
void heapsort(void *data, size_t size);

size_t binary_search(void *data, size_t size, size_t key)
{
    // Usual binary search implementation
    // ...
    return 0; // just a placeholder
}

```

I want user to specify which algorithm to use for sorting for the data and then sorting is done based on that sorting algorithm and then binary search is called to search for a key in that data.

How do I implement this imposing minimum responsibility on the user?