Forum Discussion on linked list(Week-4)

week 4

week 4

by Antho Ghosh -
Number of replies: 0

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 next pointer of new node to NULL.

4)Traverse from head node till tail node.

5)Insert new after after tail node. Set next pointer of tail node to new node.


Answer to the question no:02


There are three types of Linked List.

1.Singly Linked List

2.Doubly Linked List

3.Circular Linked List


Answer to the question no:03


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 single link list every node contains a single pointer to represent next node So we can move only forwardly. Backward movement is not possible without recursion.

* In single link list any operations is performed sequentially and so for a huge no of data item any operation can be very slow.

* Link list can not contain detail description about its own as total number of node, Total no of deleted nodes, total number of updated nodes etc. Without any operation user can not display the detail description about the link list.