• 15 hours ago
Transcript
00:00Now if I want to create a link list, then there are two special nodes in the link list that
00:04we always mark.
00:06Which nodes are there? If I imagine this link list, I target two nodes in the link list or store
00:13two nodes.
00:16One is my head node, head or head, and one is my tail node, tail or pooch.
00:24If I want to track any link list, then I have two things.
00:30One is my head node and one is my tail node. Head node is the node that comes in the
00:36link list.
00:38And tail node is the node that comes in the link list.
00:42Here we don't believe the null node, here we call the last valid node.
00:49Now if I have only head data, let's assume that I have only head and tail data, and I don't
00:56have this node.
00:57So what can I say? Then I can reach this node. How can I reach this node?
01:02Because I have head or node data, I will have next data.
01:06And you know that the next node will be where will be.
01:11So from next, I will reach the value to this node.
01:15And you know that the next node is where is.
01:17So I will reach the value to this node.
01:20So when we traverse the link list, we have one node data.
01:25What do we do? We remove next information from that node.
01:28And then we increase to the next node in the form of a loop.
01:34If I want to visualize this thing, then what do we do in a link list?
01:39If I have a link list in which there is some data stored, D.
01:43And with this next information.
01:45Now there is another node that has different information.
01:50Another node that has different information.
01:53Another node that has different information.
01:56And finally, this is the next node.
01:59And this is the next node.
02:00And this is the next node.
02:03What can I say?
02:05If I have only head.
02:07We keep the tail by default.
02:09The tail is in one or two functions.
02:11And the most operations we perform in the head.
02:14So we perform in the first node.
02:17If I have only head node.
02:19Then I will reach the next node.
02:21I will reach the next node.
02:22Then I will reach the next node.
02:24Tells the next node it touches.
02:25Then I will reach the next node.
02:26If I have even過去 and in other nodes.
02:29Then it will Britann itself and I know that the new node is null!
02:33I will find that I have passed the entire link list.
02:37Traverse or traversed.
02:38So this should start the starting node within the head node.
02:44In this way.
02:50So what can I do? If I have some data and next stored in it,
02:53then my head will also point to this node
02:56and my tail will also point to this node
02:59and my next is pointing to this node
03:02So this is just a case where my head
03:05and tail are equal. In other cases
03:08head and tail are stored on opposite ends of the linked list
03:11One time we are going to create our head and tail
03:15Where will I do them?
03:16I have created a node class in the linked list
03:20Now there is one head and one tail
03:23So what can I do? I can define them as a property
03:27as a class as a property
03:28What will I do? I will make them static
03:30Public static node head
03:33So my head is also my node type
03:36and with it another property
03:38Public static node tail
03:41So when I have created a main class
03:44I will create a linked list
03:45I will write linked list
03:50LL is equal to new linked list
04:02LL is equal to new linked list
04:20And now I will go to the next
04:24I can do another data store
04:26New node of 2
04:29So my head has one data store
04:33And it points to a new node
04:35Where I have a data store
04:37Now I have a lot of things
04:39I have not done here
04:40Like I have to initialize
04:43I have to initialize the tail
04:44I have to change the new values
04:45I have to change the tail
04:46I have to change the tail
04:47So these operations
04:49We will not manage these
04:51To add elements in a linked list
04:52To add elements
04:54To delete elements
04:55We will not write code in the main function
04:57We will create methods
04:59And where will we create methods?
05:01We will create methods in our linked list class
05:05In the linked list class
05:06I will create a method
05:07and now my � unpresence
05:11I will create methods
05:11To remove my linked list
05:13I will make Leah's link list
05:15I will create crypto
05:16And I will create method
05:17In the linked list
05:17If I also do shell
05:22I will create methods
05:27Vale.