Question: CODE IN C + + ONLY. Write a function called insertionSort ( ) that will use insertion sorting method to sort a doubly linked list.

CODE IN C++ ONLY. Write a function called insertionSort() that will use insertion sorting method to sort a doubly linked list. The list members will contain an int value, *prev, and *next. DO NOT put the member values into an array or vector. The function should iterate through until the doubly linked list is completely sorted. After each node has been moved (after one iteration) the function should display the complete current list. This means it should display all of the original numbers as they are currently in the list, that way the user can see how insertion sort works. THIS MUST PRINT every time showing how the nodes are being moved in the doubly linked list.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!