Consider the following sorting algorithms:

Bubble sort, Merge sort, Insertion sort, 
Quick sort, Selection sort and Heap sort 

Which of the following statement(s) is/are correct regarding inplace sorting algorithms?

(A) Bubble sort, Selection sort, Merge sort and Heap sort
(B) Selection sort, Quick sort, and Heap sort
(C) Bubble sort, Insertion sort, Heap sort, and Selection sort
(D) Both (B) and (C)


Answer: (D)

Explanation: In given sorting algorithms: Bubble sort, Merge sort, Insertion sort, Quick sort, Selection sort and Heap sortm.

All are In-place sorting algorithms except Merge sort which is out-place.

So, option (D) is correct.

Quiz of this Question


  • Last Updated : 15 Nov, 2018

Share your thoughts in the comments