merge sort to understand merge sortwe take an unsorted array as the following we know that merge sort first divides the whole array iteratively into equal halves unless the atomic values are achieved we see here that an array of items is divided into two arrays of size this does not change the sequence of appearance of items in the original now we divide these two arrays into halves we further divide these arrays and we achieve atomic value which can no more be divided nowwe combine them in exactly the same manner as they were broken down please note the color codes given to these lists we first compare the element for each list and then combine them into another list in sorted manner we see that and are in sorted positions we compare and and in the target list of values we put firstfollowed by we change the order of and whereas and are placed sequentially in the next iteration of the combining phasewe compare lists of two data valuesand merge them into list of found data values placing all in sorted order after the final mergingthe list should look like this now we should learn some programming aspects of merge sorting algorithm