Question: Given this function, how would you do insertion sort on link list without changing the parameters ex: 1-> 9 -> 2 -> 4 output: 1->2->4->9

Given this function, how would you do insertion sort on link list without changing the parameters

ex: 1-> 9 -> 2 -> 4

output: 1->2->4->9

there is a struct that has:

struct node {

int data;

struct node * next;

};

void sort_list(nodePT L)

{

}

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!