Merge Sort
1. What is the complexity of merging two subarrays in the merge sort algorithm? Assume the sizes to be M and N.
2. Which of the following algorithms perform better than merge sort in the worst case time complexity?
3. In merge sort, what is the time complexity of finding the midpoint of the current subarray to determine where it should be divided?
4. What will be the maximum possible array size at the ith level of the merge sort tree for an array of size N (assume level indexing starts from 0, i.e, the original array at the root is said to be at the 0th level)? Fractional results will be rounded up to the nearest integer.
5. What is the main purpose of the merge operation in merge sort?
6. What happens to the size of each subarray when merge sort divides an array into two approximately equal parts?
7. Which of the following is the base case for recursively dividing an array in merge sort?
8. If two sorted subarrays contain and elements, respectively, how many elements must be processed in total to produce their merged result?
9. Which statement best explains why the total merging work at one level of the merge sort tree is for an array containing elements?