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. Which of the following is the tightest upper bound on time complexity of this modified 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...
The time complexity is given by: T(N) = T(N/3) + T(2N/3) + N Solving the above recurrence relation gives, T(N) = N(logN base 3/2)
View all questions of this test
Most Upvoted Answer
In a modified merge sort, the input array is splitted at a position on...
Explanation:
Merge sort is a divide and conquer algorithm that recursively divides the input array into two halves, sorts them independently, and then merges the sorted halves to obtain a sorted array. The time complexity of merge sort is usually expressed as O(NlogN), where N is the length of the input array.

In this modified version of merge sort, the input array is split at a position one-third of the length(N) of the array. Let's analyze the time complexity of this modified merge sort.

Splitting the Array:
When the array is split at one-third of its length, the size of each subarray is approximately N/3. This splitting process continues recursively until the subarrays have a size of 1.

Sorting the Subarrays:
Since each subarray has a size of N/3, the time complexity to sort each subarray is O((N/3)log(N/3)). This is because we are sorting a subarray of size N/3 using the modified merge sort algorithm.

Merging the Sorted Subarrays:
The merging process in merge sort takes linear time. In this case, the merging step takes O(N) time because we are merging two subarrays of size N/3 each.

Total Time Complexity:
To calculate the total time complexity of this modified merge sort, we need to consider the time complexity of splitting, sorting, and merging.

The splitting process occurs recursively, dividing the array into two halves at each level. Since the array is split at one-third of its length, the number of levels in the recursion tree is logN base 3. Therefore, the time complexity of splitting is O(N(logN base 3)).

The sorting process occurs at each level of the recursion tree and has a time complexity of O((N/3)log(N/3)).

The merging process occurs at each level as well and takes O(N) time.

Since the splitting, sorting, and merging occur independently, we can sum up their time complexities to obtain the total time complexity.

Total Time Complexity = O(N(logN base 3)) + O((N/3)log(N/3)) + O(N)

Simplifying the expression, we get:

Total Time Complexity = O(N(logN base 3))

Therefore, the tightest upper bound on the time complexity of this modified merge sort is N(logN base 3), which is option 'A'.
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. Which of the following is the tightest upper bound on time complexity of this modified 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. Which of the following is the tightest upper bound on time complexity of this modified 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. Which of the following is the tightest upper bound on time complexity of this modified 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. Which of the following is the tightest upper bound on time complexity of this modified 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. Which of the following is the tightest upper bound on time complexity of this modified 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. Which of the following is the tightest upper bound on time complexity of this modified 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. Which of the following is the tightest upper bound on time complexity of this modified 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. Which of the following is the tightest upper bound on time complexity of this modified 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. Which of the following is the tightest upper bound on time complexity of this modified 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. Which of the following is the tightest upper bound on time complexity of this modified 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