Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  In a modified merge sort, the input array is ... Start Learning for Free
In a modified merge sort, the input array is splitted at a position one-third of the length(N) of the array. What is the worst case time complexity of this merge sort?
  • a)
    N(logN base 3)
  • b)
    N(logN base 2/3)
  • c)
    N(logN base 1/3)
  • d)
    N(logN base 3/2)
Correct answer is option 'D'. Can you explain this answer?
Verified Answer
In a modified merge sort, the input array is splitted at a position on...
If we use recursion tree first we have n elements then two subparts n/3 and 2n/3

Assume a tree here 

n divided in to n/3 and 2n/3

n/3 divided in to n/9 and 2n/9 ( this tree goes on left side and vanishes to 1 element)

2n/3 divided in to 2n/9 and 4n/9 ( here 4n/9 part grows even left side is vanished)

 so we will have time complexity based on deepest height 

and the elements in that is  n -->n/(3/2) ----> n/(3/2)^2 ---> n/(3/2)^3---> ..  1

Solving the above equation we get n * logn/log(3/2) = n logn/log(3/2).

To learn more about Sorting algorithms:

View all questions of this test
Most Upvoted Answer
In a modified merge sort, the input array is splitted at a position on...
Explanation:

In the modified merge sort, the input array is split at a position one-third of the length(N) of the array. This means that the array is divided into two parts, one part being two-thirds of the array and the other part being one-third of the array.

Time Complexity of Merge Sort:
- In the regular merge sort algorithm, the time complexity is given by T(N) = 2T(N/2) + O(N), where T(N) represents the time complexity of sorting an array of size N.
- This is because the array is recursively divided into two halves, and then the two halves are merged.
- The time complexity of merging two sorted arrays of size N/2 is O(N). Therefore, the overall time complexity is O(N logN).

Modified Merge Sort:
- In the modified merge sort, the array is split at a position one-third of the length(N) of the array.
- This means that one part of the array is of size 2N/3 and the other part is of size N/3.
- The larger part of the array is recursively sorted using the modified merge sort algorithm.
- The smaller part of the array is sorted using a different algorithm or a simpler version of merge sort.
- Finally, the two sorted parts are merged.
- The time complexity of sorting the larger part of the array remains the same as the regular merge sort, i.e., O((2N/3) log(2N/3)).
- The time complexity of sorting the smaller part of the array is not specified, but let's assume it to be O((N/3) log(N/3)).
- The time complexity of merging the two sorted parts is O(N).
- Therefore, the overall time complexity of the modified merge sort can be approximated as O((2N/3) log(2N/3) + (N/3) log(N/3) + N).

Worst Case Time Complexity:
- In the worst case, the time complexity is determined by the larger part of the array, which is O((2N/3) log(2N/3)).
- As N approaches infinity, the base of the logarithm becomes insignificant, and we can simplify the time complexity to O(N logN).
- Therefore, the worst case time complexity of the modified merge sort is O(N logN).

Answer:
The correct answer is option 'D', N(logN base 3/2).
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

In a modified merge sort, the input array is splitted at a position one-third of the length(N) of the array. What is the worst case time complexity of this merge sort?a)N(logN base 3)b)N(logN base 2/3)c)N(logN base 1/3)d)N(logN base 3/2)Correct answer is option 'D'. Can you explain this answer?
Question Description
In a modified merge sort, the input array is splitted at a position one-third of the length(N) of the array. What is the worst case time complexity of this merge sort?a)N(logN base 3)b)N(logN base 2/3)c)N(logN base 1/3)d)N(logN base 3/2)Correct answer is option 'D'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about In a modified merge sort, the input array is splitted at a position one-third of the length(N) of the array. What is the worst case time complexity of this merge sort?a)N(logN base 3)b)N(logN base 2/3)c)N(logN base 1/3)d)N(logN base 3/2)Correct answer is option 'D'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for In a modified merge sort, the input array is splitted at a position one-third of the length(N) of the array. What is the worst case time complexity of this merge sort?a)N(logN base 3)b)N(logN base 2/3)c)N(logN base 1/3)d)N(logN base 3/2)Correct answer is option 'D'. Can you explain this answer?.
Solutions for In a modified merge sort, the input array is splitted at a position one-third of the length(N) of the array. What is the worst case time complexity of this merge sort?a)N(logN base 3)b)N(logN base 2/3)c)N(logN base 1/3)d)N(logN base 3/2)Correct answer is option 'D'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of In a modified merge sort, the input array is splitted at a position one-third of the length(N) of the array. What is the worst case time complexity of this merge sort?a)N(logN base 3)b)N(logN base 2/3)c)N(logN base 1/3)d)N(logN base 3/2)Correct answer is option 'D'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of In a modified merge sort, the input array is splitted at a position one-third of the length(N) of the array. What is the worst case time complexity of this merge sort?a)N(logN base 3)b)N(logN base 2/3)c)N(logN base 1/3)d)N(logN base 3/2)Correct answer is option 'D'. Can you explain this answer?, a detailed solution for In a modified merge sort, the input array is splitted at a position one-third of the length(N) of the array. What is the worst case time complexity of this merge sort?a)N(logN base 3)b)N(logN base 2/3)c)N(logN base 1/3)d)N(logN base 3/2)Correct answer is option 'D'. Can you explain this answer? has been provided alongside types of In a modified merge sort, the input array is splitted at a position one-third of the length(N) of the array. What is the worst case time complexity of this merge sort?a)N(logN base 3)b)N(logN base 2/3)c)N(logN base 1/3)d)N(logN base 3/2)Correct answer is option 'D'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice In a modified merge sort, the input array is splitted at a position one-third of the length(N) of the array. What is the worst case time complexity of this merge sort?a)N(logN base 3)b)N(logN base 2/3)c)N(logN base 1/3)d)N(logN base 3/2)Correct answer is option 'D'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev