Forum Discussion on linked list(Week-4)

Answer

Answer

by Nur Salek Ashar -
Number of replies: 0

Answer No.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




Answer No.2

There are three common types of Linked List:

Circular Linked List.

Singly or Chain Linked List.

Doubly or Two Way Linked List. section.



Answer 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.Nodes are stored noncontiguous, greatly increasing the time periods required to access individual elements within the list, especially with a CPU cache.
4.Difficulties arise in linked lists when it comes to reverse traversing. For instance, singly-linked lists are cumbersome to navigate backward [1] and while doubly linked lists are somewhat easier to read, memory is consumed in allocating space for a back-pointer.