# Merge Sort Algorithm in Data Structures With Example/ What is merge sorting in data structure?

Hello Friends, In this blog post(Merge Sort Algorithm in Data Structures With Example) 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 Algorithm in Data Structures With Example), 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|Merge Sort Algorithm in Data Structures With Example|

Then the operation that combines the elements of A and B into a new sorted list C with Z = X+Y number of elements is called merging(Merge Sort Algorithm in Data Structures With Example). 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|Merge Sort Algorithm in Data Structures With Example|

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|Merge Sort Algorithm in Data Structures With Example|

### 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?**

**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 Algorithm in Data Structures With Example) 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 Algorithm in Data Structures With Example’.

Please feel free to give your important feedbacks in the comment section below|Merge Sort Algorithm in Data Structures With Example|

Have a great time! Sayonara!