Open In App

Algorithms | Misc | Question 3

Which of the following is not an in-place algorithm?
(A) Insertion sort
(B) Selection sort
(C) Merge sort
(D) Heap sort

Answer: (C)
Explanation: An in-place algorithm is an algorithm which uses a constant amount of extra space apart from input.
Merge sort uses an extra O(n) space in the merging part.

Article Tags :