retagged by
695 views

1 Answer

0 votes
0 votes
Yes that's right because

A) insertion sort would need O(n) space for data and O(n) stack space.

C) merge sort would take O(n) data space and O(n logn) stack space. Hint: it is an outplace algorithm

D) same as A

B) takes O(n) data space and O(logn) stack space in all cases except the worst.
Answer:

Related questions

1 votes
1 votes
3 answers
1
9 votes
9 votes
2 answers
3
vineet.ildm asked Nov 7, 2016
5,814 views
Why space complexity of heapsort is O(1)....and why not O(logn)..because of space required by recursion calls which is equivalent to height of the tree...where am i getti...