Merge Sort - CodeTextPro - CodeTextPro | Free Web Tutorial

Codetextpro Provides free Web tutorial, HTML, CSS, C, C++, Java, JavaScript, PHP, MySql, Python, Program, Programming Notes, Programming Questions and more.

Programming

Friday, August 2, 2019

Merge Sort - CodeTextPro

Merge sort is a sorting algorithm that uses divide, conquer and combine algorithm technic.

Divide: Divide means partitioning the n- element array to be sorted into two sub-array of n/2 elements. If A is an array containing 0 or 1 element, then it's already sorted. However, if there are more elements in the array divide A* two sub-array. Each containing about half of the elements of A.

Conquer: Conquer means sorting the two sub-array recurshiply using merge sort.

Combine: Combine means merging the two sorted sub-array of size n/2 to produce the sorted array of 'n' elements.


merge sort
Merge Sort

merge sort in c
Merge Sort
Divide and Conquer the array.


merge sort
Merge Sort
Combine the elements from a sorted array.

No comments:

Post a Comment