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
Nandkishor3939
asked
in
Algorithms
Jan 21, 2019
692
views
0
votes
0
votes
What is the extra memory needed for merge sort:
1] In case of Iterative merge sort.(DS:Array)
2]In case of Recursive merge sort.(DS:Array)
3] In case of Iterative merge sort.(DS:Linked List)
4]In case of Recursive merge sort.(DS:Linked List)
merge-sort
algorithms
sorting
Nandkishor3939
asked
in
Algorithms
Jan 21, 2019
by
Nandkishor3939
692
views
answer
comment
Follow
share this
share
2 Comments
by
noob_coder
commented
Apr 30, 2019
reply
Follow
share this
Case :1 Only extra array of size n will be needed.
Case 2: Extra array + Stack space
Case 3: I think we will not need any extra space for rersult as we can just change the links.
Case 4. only stack space will be extra.
3
3
by
reboot
commented
Jan 4, 2021
reply
Follow
share this
I think, even in array variant of iterative merge sort we can perform in-place sorting. Hence, O(1) for case 1 too.
0
0
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
0
Answers
← Previous
Next →
← Previous in category
Next in category →
Related questions
1
vote
1
vote
4
answers
1
iarnav
asked
in
Algorithms
Apr 25, 2019
3,901
views
Total number of function calls in Merge sort Algorithm
In Merge sort Algorithm when I took input array of size 2 and I got 4 function calls as including original function call with which I call MS algorithm i.e. MS (1,2) and which in turn calls two recursive function calls to merge ... function calls. So, how can I analyze the total number of function calls when input array size is n? thank you!
iarnav
asked
in
Algorithms
Apr 25, 2019
by
iarnav
3.9k
views
algorithms
merge-sort
sorting
0
votes
0
votes
0
answers
2
Vikas123
asked
in
Algorithms
Jan 8, 2019
1,025
views
Merge Sort
Can anyone help me to understand this problem….??
Vikas123
asked
in
Algorithms
Jan 8, 2019
by
Vikas123
1.0k
views
merge-sort
algorithms
sorting
merging
0
votes
0
votes
1
answer
3
Abhisek Tiwari 4
asked
in
Algorithms
Nov 24, 2018
634
views
Merge Sort Inplace
no of comparisons in merge sort max? how many max no swaps??[if inplace algo]
Abhisek Tiwari 4
asked
in
Algorithms
Nov 24, 2018
by
Abhisek Tiwari 4
634
views
algorithms
sorting
merge-sort
3
votes
3
votes
1
answer
4
Kaushal Sanadhya
asked
in
Algorithms
Oct 9, 2018
1,663
views
Merge sort
How many swaps are performed in Merge sort algorithm in worst case?
Kaushal Sanadhya
asked
in
Algorithms
Oct 9, 2018
by
Kaushal Sanadhya
1.7k
views
merge-sort
algorithms
sorting
merging
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
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
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy