Forum Discussion on linked list(Week-4)

Discussion that topic

Discussion that topic

by 201-15-3695 Tasnim Forhad Rimon -
Number of replies: 0
Answer to the Question Number - 1

To insert a node at the end of Linked List we have to follow the given procedure:
1) Dynamically create a new node using malloc function.
2)Set data field of new node.
3)Set the next pointer of the new node to NULL.
4)Traverse from head node till the tail node.
5)Insert new after the tail node. Set the next pointer of the tail node to a new node.

#Answer to the Question Number - 2

There are three types of Linked List.
1.Singly Linked List
2.Doubly Linked List
3.Circular Linked List

Answer to the Question Number - 3

Some drawbacks of the linked list are given below :

* In single link list nodes are connected using a single pointer to point to the next node. If the link list is accidentally destroyed then the chances of data loss after the destruction point is maximum. Data recovery is not possible.
* In a single link list every node contains a single pointer to represent the next node So we can move only forwardly. Backward movement is not possible without recursion.
* In a single link list any operations are performed sequentially and so for a huge no of data items any operation can be very slow.
* Link list can not contain detailed description about its own as the total number of nodes, Total no of deleted nodes, the total number of updated nodes, etc. Without any operation, the user can not display the detailed description of the link list.