Merge Sort Algorithm

Merge Sort Algorithm Merge Sort is a Divide and Conquer algorithm. It divides input array in 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 key process that assumes that arr[l..m] and arr[m+1..r] are sorted and merges … Read more

Insertion Sort Algorithm

algorithm

Overview : Insertion Sort Algorithm Sorting is the process of arranging a list of elements in a particular order (Ascending or Descending). What is Insertion sort In insertion sort algorithm, every iteration moves an element from unsorted portion to sorted portion until all the elements are sorted in the list. Insertion Sort Algorithm sorts array by … Read more