Linked List
A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations. The elements in a linked list are linked using pointers as shown in the below image:
A linked list consists of nodes where each node contains a data field and a reference to the next node in the list.
Linked List VS Array
- Array:
a) Linear collection of data elements
b) Store value in consecutive memory locations
c) Can be random in accessing of data
- Linked List:
a) Linear collection of nodes
b) Doesn't store its nodes in consecutive memory locations
c) Can be accessed only in a sequential manner
A linked list consists of nodes where each node contains a data field and a reference to the next node in the list.
Linked List VS Array
- Array:
a) Linear collection of data elements
b) Store value in consecutive memory locations
c) Can be random in accessing of data
- Linked List:
a) Linear collection of nodes
b) Doesn't store its nodes in consecutive memory locations
c) Can be accessed only in a sequential manner
Types of Linked List
1. Single Linked List
2. Double/Doubly Linked List
3. Circular Single Linked List
4. Circular Doubly Linked List





Comments
Post a Comment