The document contains C++ code to implement merge sort. It defines functions for merging two sorted arrays, recursively applying the merge sort algorithm, and printing the sorted array. The main function takes input array and index array, calls merge sort to sort the input array in place, and prints the sorted index array.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
68 views2 pages
1156
The document contains C++ code to implement merge sort. It defines functions for merging two sorted arrays, recursively applying the merge sort algorithm, and printing the sorted array. The main function takes input array and index array, calls merge sort to sort the input array in place, and prints the sorted index array.