Free Placement Courses @ GeeksforGeeks :
- Sudo Placement : For companies like Amazon, Microsoft, Adobe, .., etc
- Sudo Placement 2 : For companies like TCS, Infosys, Wipro, Cognizant, .. etc
MergeSort 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 merg() function is used for merging two halves. The merge(arr, l, m, r) is key process that assumes … More on Merge Sort
Selection sort makes O(n) swaps which is minimum among all sorting algorithms mentioned above.
N(logN base 3)
N(logN base 2/3)
N(logN base 1/3)
N(logN base 3/2)
Merge Sort works better than quick sort if data is accessed from slow sequential memory.
Merge Sort is stable sort by nature
Merge sort outperforms heap sort in most of the practical situations.
All of the above.
Time complexity of merge sort is Θ(nLogn) c*64Log64 is 30 c*64*6 is 30 c is 5/64 For time 6 minutes 5/64*nLogn = 6*60 nLogn = 72*64 = 512 * 9 n = 512.