you are here->home->Class 12->Merge Sort
Merge Sort
 1) What is the purpose of the mergeSort function? To split an array To merge an array To sort an array To create an array

 2) What is the purpose of the merge function? To create a new array To sort an array To merge two sorted subarrays To split an array

 3) What is the time complexity of the mergeSort function? O(log n) O(n log n) O(n^2) O(n)

 4) What does the line m = l+(r-l)//2 do? It finds the sum of the array It finds the middle element of the array It finds the difference between the left and right elements It finds the length of the array

 5) What is the value of n at the end of the program? 6 7 5 0

 6) What is the purpose of the L and R arrays? To store the left and right elements To store the unsorted elements To store the middle element To store the sorted elements

 7) What does the line arr[k] = L[i] do? It merges the left and right elements It removes an element from the array It adds an element to the array It sorts the array

 8) What is the purpose of the i and j variables? To track the position of the middle element To track the position of the left and right elements To track the position of the unsorted elements To track the position of the sorted elements

 9) What type of sorting algorithm is Merge Sort? Divide and Conquer Insertion Sort Bubble Sort Selection Sort

 10) What is the main advantage of Merge Sort compared to other sorting algorithms? It is stable It is easy to understand It uses less memory It is fast