By Abhinesh R P
It is the very fastest sorting algorithm. It is written in C++ without using any special header files or modules.
Programming language:
C++
Divide and conquer is the way of proceeding with the merge sort function.
How the code flows?
1. First the user is asked for the number of elements to sort.
2. Then, the elements are taken as input from the user.
3. Finally, the elements are displayed in sorted order.
The array size and array elements are obtained within the main() function of the code.
The array is divided in the mergesort() function.
And the divided array is merged in the merge() function.
Submitted by Abhinesh R P (abhinesh)
Download packets of source code on Coders Packet
Comments