1. How can someone insert a node at the end of Linked List?
2. How many types of Linked List exist?
3. Mention some drawbacks of the linked list.
#Answer for question:-01
If we wanna add a new node to the end of a linked list, we need to add a new node through the last insert. We know that the address portion of the last node in a linked list is drained. If we wanna add a new node to the end of the linked list, I first need to create a new node and insert data into the node. Then with the newly created node you have to associate the last node with the zero of the existing linked list and cancel the address part of the new node. A new node will then be added as a node at the end of the linked list and null will be assigned to the address section.
#Answer for question:-02
There are three common types of Linked List:
Circular Linked List.
Singly or Chain Linked List.
Doubly or Two Way Linked List.
#Answer for question:-03
Some drawbacks of linked list are mentioning:
We can't steer it from the last and exactly the first direction.
Each component requires a different amount of time to access.
This requires more space because pointers are also stored with data.
It is difficult to remove elements in a straight connected rundown but nothing.
Time Complexity Array can be randomly accessed , while the Linked list cannot be accessed Randomly.
Without requiring us to go to a certain element, we have no feel for each of the elements that preceded those elements.
Answer for question :-01
If we wanna add a new node to the end of a linked list, we need to add a new node through the last insert. We know that the address portion of the last node in a linked list is drained.Answer for question :-02
There are three common types of Linked List: Circular Linked List.
Singly or Chain Linked List.
Doubly or Two Way Linked List.
Answer for question:-03
Some drawbacks of linked list are mentioning:Answer 1:
If we wanna add a new node to the end of a linked list, we need to add a new node through the last insert. We know that the address portion of the last node in a linked list is drained.
If we wanna add a new node to the end of the linked list, I first need to create a new node and insert data into the node. Then with the newly created node you have to associate the last node with the zero of the existing linked list and cancel the address part of the new node. A new node will then be added as a node at the end of the linked list and null will be assigned to the address.
Answer 2:
There are three types of Linked List:
1.Circular Linked List.
2.Singly or Chain Linked List.
3.Doubly or Two Way Linked List.
Answer 3:
Some drawbacks of linked list:
Memory Usage
More memory is required to store elements in linked list as compared to array. Because in linked list each node contains a pointer and it requires extra memory for itself.
Traversal
Elements or nodes traversal is difficult in linked list. We can not randomly access any element as we do in array by index. For example if we want to access a node at position n then we have to traverse all the nodes before it. So, time required to access a node is large.
Reverse Traversing
In linked list reverse traversing is really difficult. In case of doubly linked list its easier but extra memory is required for back pointer hence wastage of memory.
Answer to the question no(1)
We know that if we want to add a new node at the end of a linked list, we have to add a new node through the last insert. I also know that the address part of the last node in a linked list is null.
Now if I want to insert a new node at the end of the linked list, I first need to create a new node and insert data into the node. Then with the newly created node, you have to link the last node with the null of the existing linked list and null the address part of the new node.
Then a new node will be added as the last node at the end of the linked list and null will be assigned to the address part.
Answer to the question no (2)
There are three types of Linked List.
1.Singly Linked List
2.Doubly Linked List
3.Circular Linked List
Answer to the question no (3)
Some of the drawbacks in the linked list are mentioned below:
1) It requires more space as pointers are also stored with information.
2)Different amount of time is required to access each element.
3) If we have to go to a particular element then we have to go through all those elements that come before that element.
4) we can not traverse it from last & only from the beginning.
5) It is not easy to sort the elements stored in the linear linked list.
Answer -01
Answer -02
Answer -03
Answer to the question no 1:
If we wanna add a new node to the end of a linked list, we need to add a new node through the last insert. We know that the address portion of the last node in a linked list is drained. If we wanna add a new node to the end of the linked list, I first need to create a new node and insert data into the node. Then with the newly created node you have to associate the last node with the zero of the existing linked list and cancel the address part of the new node. A new node will then be added as a node at the end of the linked list and null will be assigned to the address section.
Answer to the question no 2:
There are three types of Linked List.
1.Singly Linked List
2.Doubly Linked List
3.Circular Linked List
Answer to the question no 3:
1.They use more memory than arrays because of the storage used by their pointers.
2.Nodes in a linked list must be read in order from the beginning as linked lists are inherently sequential access.
3.Array can be randomly accessed, while the Linked list cannot be accessed Randomly.
Answer to the question no. 1
Answer to the question no. 2
Answer to the question no. 3
Answer the question and discuss if you have any confusion
Answer the question and discuss if you have any confusion
1. How can someone insert a node at the end of Linked List?
2. How many types of Linked List exist?
3. Mention some drawbacks of the linked list.
Answer to the question no(1)
We know that if we want to add a new node at the end of a linked list, we have to add a new node through the last insert. I also know that the address part of the last node in a linked list is null.
Now if I want to insert a new node at the end of the linked list, I first need to create a new node and insert data into the node. Then with the newly created node, you have to link the last node with the null of the existing linked list and null the address part of the new node.
Then a new node will be added as the last node at the end of the linked list and null will be assigned to the address part.
Answer to the question no (2)
There are three types of Linked List.
1.Singly Linked List
2.Doubly Linked List
3.Circular Linked List
Answer to the question no (3)
Some of the drawbacks in the linked list are mentioned below:
1) It requires more space as pointers are also stored with information.
2) Different amount of time is required to access each element.
3) If we have to go to a particular element then we have to go through all those elements that come before that element.
4) we can not traverse it from last & only from the beginning.
5) It is not easy to sort the elements stored in the linear linked list.
#Answer for question:-01
If we wanna add a new node to the end of a linked list, we need to add a new node through the last insert. We know that the address portion of the last node in a linked list is drained. If we wanna add a new node to the end of the linked list, I first need to create a new node and insert data into the node. Then with the newly created node you have to associate the last node with the zero of the existing linked list and cancel the address part of the new node. A new node will then be added as a node at the end of the linked list and null will be assigned to the address section.
#Answer for question:-02
There are three common types of Linked List:
Circular Linked List.
Singly or Chain Linked List.
Doubly or Two Way Linked List.
#Answer for question:-03
Some drawbacks of linked list are mentioning:
We can't steer it from the last and exactly the first direction.
Each component requires a different amount of time to access.
This requires more space because pointers are also stored with data.
It is difficult to remove elements in a straight connected rundown but nothing.
Time Complexity Array can be randomly accessed , while the Linked list cannot be accessed Randomly.
Without requiring us to go to a certain element, we have no feel for each of the elements that preceded those elements.
Ans. to the question no-1
Ans. to the question no-2
Types of Linked List:Ans. to the question no-3
Answer to the question number :1
If we wanna add a new node to the end of a linked list, we need to add a new node through the last insert. We know that the address portion of the last node in a linked list is drained. If we wanna add a new node to the end of the linked list, I first need to create a new node and insert data into the node. Then with the newly created node you have to associate the last node with the zero of the existing linked list and cancel the address part of the new node.
Then a new node will be added as the last node at the end of the linked list and null will be assigned to the address part.
Answer to the question number :2
There are three common types of Linked List:
1.Circular Linked List.
2.Singly or Chain Linked List.
3.Doubly or Two Way Linked List.
Answer to the question number :3
Some of the drawbacks in the linked list are mentioned below:
1) It requires more space as pointers are also stored with information.
2) Different amount of time is required to access each element.
3.Time Complexity Array can be randomly accessed , while the Linked list cannot be accessed Randomly.
4.Without requiring us to go to a certain element, we have no feel for each of the elements that preceded those elements.