DataStructures / Data structures Interview questions
What are the different types of linked list?
There are 3 types of linked list.
Singly Linked List: Every node stores address or reference of next node in list and the last node has next address or reference as NULL.
Doubly Linked List: There are two references associated with each node, one of the references points to the next node and other to the previous node. Advantage of this data structure is that we can traverse in both the directions and for deletion we don't need to have explicit access to previous node.
Circular Linked List: Circular linked list is a linked list where all nodes are connected to form a circle. There is no NULL at the end. A circular linked list can be a singly circular linked list or doubly circular linked list. Advantage of this data structure is that any node can be made as starting node. This is useful in implementation of circular queue in linked list.
More Related questions...