Which of the following sorting algorithms could be implemented on a doubly-linked list WITHOUT making the asymptotic worst-case complexity even worse? You must perform the sorting in-place, you CANNOT just copy to an array and then use the normal algorithm

I. Bubble sort
Il. Selection sort
IlI. Insertion sort
IV. Quicksort
V. Heapsort

A. I, II, and IlIl only
B. IV and V only
C. I and II only
D. Iand Il only
E. All except V

Respuesta :

Answer:

C. I and II only

Explanation:

Doubly-linked list is used for sorting algorithms. To sort doubly-linked lists first sort the nodes current and nodes index then compare the data of current and index node. Bubble sort and Selection sort can be used for algorithm sorting without asymptotic complexity. Bubble sort can be created when adjacent nodes are in ascending order.