Jenny's Lectures CS IT
WE are going to represent a doubly-linked list Logically. We have discussed in previous video
introduction of doubly linked list.
❖ SO I hope you know the concept of structures how we can use this structure in C
language. WE will declare a variable either a variable or a pointer using that variable or
that pointer.
❖ We can access the members of structure. THe code to create. This linked list code is
very much similar to the singly linked list. A function that tells create so now I 'm going
to write down that thing also
❖ . WE are going to create a node to store this data to insert the data in the linked list.
Initially, we assume that the slist list is empty right
❖ . New node is a pointer pointer pointer that has been created and this point that is
going to store what whatever my loop will return that. 250. and whatever this malloc
will return? Where you will we are going to. store that thing in new node.
❖ So here you will write would new nodes. So this is how memory dynamically the
memory has been allocated to this new node...
Head is not a null now head is containing 250 so in that case, how we will insert so in else part
what you will write so now see in the linked list I have only 1 node.
I will ask how to update this link. How you will excess this part of this node. Then you will say
ma'am.
We have a pointer to this node. When I want to insert a third node I have created another node
running by running this code again this node.
We have inserted this to here the data here. Both the previous and next pointer is containing
null. Now If head is equal to null but head is 100, so head is not and now we are going to do