Like QuickSort, Merge Sort also 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, left, mid, right) is key process that assumes that arr[left..mid] and arr[mid+1..right] are sorted and merges the two sorted sub-arrays into one.
Tag: sorting technique
Quick Sort in java
QuickSort is a sorting algorithm which follows Divide and Conquer apporach. It picks an element as pivot and partitions the given array around the picked pivot.