Describe Merge sort algorithm

Briefly describe the term merge sort algorithm?

E

Expert

Verified

A merge sort algorithm which splits the items to be sorted in two groups, recursively sorts each group, and merges them in a final, sorted sequence. Run time is T(n log n).

If n<2 then the array is already sorted. Stop now.

Otherwise, n>1, and we perform the subsequent three steps in sequence:

Sort the left half of the array.

Sort the right half of the array.

Merge the now-sorted left and right halves.

   Related Questions in Data Structure & Algorithms

©TutorsGlobe All rights reserved 2022-2023.