odd even mergesort (Batchers mergesort)

Can anyone directed me to a sample code of Batchers odd even mergesort.
I am completely stuck after the mergesort function and need help with the recursive merge portion. This is what I have:

void mergesort(int array[], int F, int L)
{
int mid;
if(F<L)
{
mid = (F+L)/2;
mergesort(array, F, mid);
mergesort(array, mid+1, L);

//merge the two halves
merge(array, F, mid, L);
}
}

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories