Showing posts with label MergeSort. Show all posts
Showing posts with label MergeSort. Show all posts
Merge Sort
Merge Sort :
This is one of the sorting algorithm which follow divide and conquer property. The time complexity of this algorithm is NLogN. Also it requires a temporary array, hence space complexity is N, where N is the number of elements to be sorted.
This is one of the sorting algorithm which follow divide and conquer property. The time complexity of this algorithm is NLogN. Also it requires a temporary array, hence space complexity is N, where N is the number of elements to be sorted.
Advantages and Disadvantages of Quicksort over Merge sort
Theoretically, both quick sort and merger sort take O(nlogn) time and hence time taken to sort the elements remains same.
Subscribe to:
Posts
(
Atom
)