help with recursive function

void partition(int arr[],int low,int high){

int mid;

if(low<high){
mid=(low+high)/2;
partition(arr,low,mid);
partition(arr,mid+1,high);
mergeSort(arr,low,mid,high);
}
}
in this how does partition function work

please help
The easiest way to understand this is to print low, mid, and high at every step. Also see http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/mergeSort.htm
Last edited on
Topic archived. No new replies allowed.