Merge Sort
Merge algorithm:
Merge Sort Implementation
template <class TYPE>
void mergeSort(vector<TYPE>& arr){
vector<TYPE> tmp(arr.size());
//call mergeSort with the array, the temporary
//and the starting and ending indices of the array
mergeSort(arr,tmp,0,arr.size()-1);
}Last updated