Following is a typical recursive implementation of Merge Sort that uses last element as pivot.
Given array is 12 11 13 5 6 7 Sorted array is 5 6 7 11 12 13
Please refer complete article on Iterative Merge Sort for more details!
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- Python Program for Iterative Merge Sort
- Java Program for Iterative Merge Sort
- Iterative Merge Sort
- Iterative Merge Sort for Linked List
- C Program for Merge Sort
- C Program for Iterative Quick Sort
- Python Program for Merge Sort
- Java Program for Merge Sort
- Java Program for Iterative Quick Sort
- C Program for Merge Sort for Linked Lists
- C/C++ Program to Count Inversions in an array | Set 1 (Using Merge Sort)
- Merge Sort with O(1) extra space merge and O(n lg n) time
- Why Quick Sort preferred for Arrays and Merge Sort for Linked Lists?
- Quick Sort vs Merge Sort
- Iterative Quick Sort