Solveeit Logo

Question

Programming and Data Structures Question on Linked Lists

Consider a list of elements 8, 7, 3, 4, 1, 9 and perform the insertion sort in ascending order. Which of the following intermediate list occur during sorting.
(A) 7, 8, 3, 4, 1, 9
(B) 7, 3, 8, 4, 1, 9
(C) 3, 4, 7, 8, 1, 9
(D) 7, 3, 4, 8, 1, 9
(E) 1,7, 3, 4, 8, 9
Choose thecorrect answer from the options given below:

A

(A) only

B

(A), (D) and (E) only

C

(B), (C) and (D) only

D

(A), (B) and (C) only

Answer

(A), (B) and (C) only

Explanation

Solution

The correct option is(D): (A), (B) and (C) only