00:01
First we need to create a doubly linked list based on keyboard input.
00:12
We can do this using a loop to read the inputs and create nodes for each value.
00:18
Then we need to update next and preview pointers of each node accordingly.
00:29
Finally after creating the linked list we need to implement bubble sort algorithm to sort the list in ascending order.
00:48
This compares the adjacent elements and swaps them if they are in wrong order.
00:54
This process is repeated until the list is sorted.
00:57
Finally we need to print the unsorted and sorted linked list.
01:00
We can do this by using printlist function which takes the heads of the linked list as an argument and points at values of each node.
01:16
To implement this program we need to create the following files.
01:19
That is main .c handles input and output as well as top level program logic.
01:29
Then node .h declares the data structure and functions bubble sort and printlist and node .c which defines bubble sort and printlist function...