cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
help with recursive function
help with recursive function
Aug 11, 2013 at 5:34pm UTC
tendoeschate
(10)
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
Aug 11, 2013 at 6:17pm UTC
ats15
(423)
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
Aug 11, 2013 at 6:18pm UTC
Topic archived. No new replies allowed.