What Is The Worst Case Time Complexity Of Merge Sort? * Code Example


Example: time complexity of merge sort

O(n*Log n):  The time complexity of MergeSort is O(n*Log n) in all the 3 cases  (worst, average and best). As the mergesort always divides the array into two halves  and takes linear time to merge two halves.

Comments

Popular posts from this blog

530 Valid Hostname Is Expected When Setting Up IIS 10 For Multiple Sites

Android - ImageView With Rounded Only One Corner

403 Access Denied On Tomcat 8 Manager App Without Prompting For User/password