# Merge Sort In Data Structure/ What is merge sorting in data structure?

Hello Friends, In this blog post(Merge Sort In Data Structure) I am going to let you know about a very important sorting technique in a data structure that is Merge Sort.

Inside this blog post(Merge Sort In Data Structure), we are going to see What is merge sorting in data structure? What is merge sort with example? Where is the merge sort used? Why merge sort is not in place?

Merging is the process of combining two or more sorted files into a third sorted file. Let ‘A’ be a sorted list containing ‘X’ number of elements and ‘B’ be a sorted list containing ‘Y’ number of elements.

Then the operation that combines the elements of A and B into new sorted list C with Z = X+Y number of elements is called merging. The merge sort works as follows:

Compare the smallest elements of A and B after finding the smallest, put into a new list C, this process is repeated until either list A or B is empty.

Now place the remaining elements of A (or perhaps B) in C. The new list C contains the sorted elements which are equal to the total sum of elements A and B lists.

### Where is the merge sort used?

Merge sort is used when we need to be guaranteed running time of O ( n log ⁡ n ) O(n \log n) O(N log N) regardless of the state of the input

### What is merge sort with example?/ Merge Sort In Data Structure?

For understanding the Merge Sort better please go through the below-given example of sorting the lists using Merge Sort step by step.

#### Please go through the below extensive blog link related to the sorting techniques:

Sorting Algorithm And Their Time Complexity In Data Structure.

What is meant by the Shell sort in data structure?

Radix Sort In Data Structure / What is the radix sort used for?

What is a quick sort of data structure?/ How do you write a quick sort?

Selection Sort In Hindi In Data Structure/ How do you perform a selection sort? / Selection sort kya hai?

Bubble Sort In Hindi In Data Structure/ What is bubble sort with example?/ Bubble Sort Kya Hai?

Insertion Sort In Hindi/ insertion sort step by step/ Insertion sort kya hai?

Searching In Data Structure/ What is the searching in data structure?

## Conclusion:

Using this blog(Merge Sort In Data Structure) post we have gone through What is merge sorting in the data structure, What is merge sort with an example, Where is merge sort used, Why merge sort is not in place.

In the case of any queries, you can write to us at [email protected] we will get back to you ASAP.

Hope! you would have enjoyed this post about ‘Merge Sort In Data Structure’.

Please feel free to give your important feedbacks in the comment section below.

Have a great time! Sayonara!

#### Anurag

I am a blogger by passion, a software engineer by profession, a singer by consideration and rest of things that I do is for my destination.