Types of Linked List

Types of Linked list

Singly Linked List: Each node has a single link to another node is called Singly Linked List.

       A singly linked list can be simply called a linked list. A singly linked list is a list that consists of a collection of nodes, and each node has two parts; one part is the data part, and another part is the address. The singly linked can also be called a chain as each node refers to another node through its address part. We can perform various operations on a singly linked list like insertion, deletion, and traversing.

Doubly Linked List:  Doubly linked list is a sequence of elements in which every node has link to its previous node and next node.

       A doubly linked list is another type of the linked list. It is called a doubly linked list because it contains two addresses while a singly linked list contains a single address. It is a list that has total three parts, one is a data part, and others two are the pointers, i.e., previous and next. The previous pointer holds the address of the previous node, and the next pointer holds the address of the next node. Therefore, we can say that list has two references, i.e., forward and backward reference to traverse in either direction.

Try here>>>