SORTING VISUALIZER -- MERGE SORT

Comparision : 0

Swap : 0

Merge Sort

  • Merge Sort is a Divide and Conquer algorithm. It divides the input array into two halves, calls itself for the two halves, and then merges the two sorted halves. The merge() function is used for merging two halves. The merge(arr, l, m, r) is a key process that assumes that arr[l..m] and arr[m+1..r] are sorted and merges the two sorted sub-arrays into one. Merge Sort is useful for sorting linked lists in O(nLogn) time.
  • Best Case Complexity: O(n*Log(n))
  • Average Case Complexity: O(n*Log(n))
  • Worst Case Complexity: O(n*Log(n))
  • Space Complexity: O(n)
What Indicates Colors ?

Compare The Element

Swap The Element