Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Merge Sort Doubt
aditi19
asked
in
Algorithms
Oct 6, 2018
934
views
0
votes
0
votes
what is the recurrence relation for merge sort?
merge-sort
algorithms
time-complexity
recurrence-relation
sorting
divide-and-conquer
aditi19
asked
in
Algorithms
Oct 6, 2018
by
aditi19
934
views
answer
comment
Follow
share this
share
1 comment
by
MiNiPanda
commented
Oct 6, 2018
reply
Follow
share this
T(n)= 2T(n/2) +Theta(n)
1
1
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
2
Answers
0
votes
0
votes
First merge sort for half array(1to m) that takes T(n/2)
Second merge sort for last half array(m+1to n)
Final phase merging them in O(n) time
So total time complexity=2T(n/2)+O(n/2)
=O(nlogn)
Ram Swaroop
answered
Mar 15, 2019
by
Ram Swaroop
comment
Follow
share this
0 Comments
Please
log in
or
register
to add a comment.
0
votes
0
votes
Reccurrence relation for merge sort is T(n)=2T(n/2)+O(n)
Sanandan
answered
Sep 12, 2020
by
Sanandan
comment
Follow
share this
0 Comments
Please
log in
or
register
to add a comment.
← Previous
Next →
← Previous in category
Next in category →
Related questions
1
vote
1
vote
1
answer
1
rahul sharma 5
asked
in
Algorithms
Mar 9, 2018
1,007
views
Merge sort algorithm
Consider the modified merge sort where we divide array into 5 equal sub arrays instead if 2(as in standard merge sort).What is the time complexity if modified merge sort? Is there any improvement over standard merge sort?
rahul sharma 5
asked
in
Algorithms
Mar 9, 2018
by
rahul sharma 5
1.0k
views
algorithms
merge-sort
sorting
time-complexity
1
vote
1
vote
0
answers
2
Parshu gate
asked
in
Algorithms
Nov 20, 2017
606
views
Merge sort and insertion sort
Parshu gate
asked
in
Algorithms
Nov 20, 2017
by
Parshu gate
606
views
algorithms
sorting
merge-sort
time-complexity
0
votes
0
votes
0
answers
3
learner_geek
asked
in
Algorithms
Oct 28, 2017
401
views
MERGE SORT
IS 2 way merge sort and normal merge sort is same.in which we have to use bottom-up merging approach by taking 2-2 element inside the list.if 5-way merge sort then in the list we have to take 5-5 elements from bottom to up for merging. if I am wrong please let me correct!
learner_geek
asked
in
Algorithms
Oct 28, 2017
by
learner_geek
401
views
merge-sort
algorithms
sorting
time-complexity
4
votes
4
votes
1
answer
4
Shivi rao
asked
in
DS
Oct 10, 2017
1,184
views
Merge sort
True or False Merge sort on Linked list takes O(nlogn)
Shivi rao
asked
in
DS
Oct 10, 2017
by
Shivi rao
1.2k
views
merge-sort
algorithms
sorting
time-complexity
Subscribe to GATE CSE 2023 Test Series
Subscribe to GO Classes for GATE CSE 2023
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Life happens, just chill and do hardwork
ISRO RECRUITMENT FOR SCIENTIST B THROUGH GATE
POWER GRID CORPORATION OF INDIA LIMITED
INSTITUTE OF BANKING PERSONNEL SELECTION
GATE Overflow books for TIFR, ISRO, UGCNET and NIELIT
Subjects
All categories
General Aptitude
(2.4k)
Engineering Mathematics
(9.1k)
Digital Logic
(3.2k)
Programming and DS
(5.8k)
Algorithms
(4.5k)
Theory of Computation
(6.6k)
Compiler Design
(2.3k)
Operating System
(4.9k)
Databases
(4.5k)
CO and Architecture
(3.7k)
Computer Networks
(4.5k)
Non GATE
(1.3k)
Others
(2.4k)
Admissions
(648)
Exam Queries
(841)
Tier 1 Placement Questions
(17)
Job Queries
(74)
Projects
(9)
Unknown Category
(855)
Recent Blog Comments
Please upload 4th Mock Test, due date was 4th Dec.
The counts of answered, marked etc in the exam...
Tests have been sent and all tests will be...
Maximum age limit changed from 35 yrs. to 28...
Hmm, sir totally getting your point ☺️☺️....
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy