# Day27 #100DaysOfCode
linked list is an important data structure learnt in schools and universities. it is a linear data structure that involves series of connected nodes. Each node is represented by a value and a pointer points to the next node. It is preferred to arrays because each node is allocated dynamically which doesn't take contiguous memory spaces if not used fully can be considered as wasted.
Linked list has many types. The most simpliest one is singly linked list. Other than that, there are doubly linked list, circular linked list.
A disadvantage of linked list is that we cannot access the elements randomly. Instead, have to traverse till meet the elements. Nor can we traverse backwards (for singly list list). This, however, can be done so in doubly or circular list.
An advantage of linked list is insertion and deletion of elements takes constant time. That means it does not change when the data size increases. Since, insertion and deletion can be as easily as breaking the links in list.
linked list is an important data structure learnt in schools and universities. it is a linear data structure that involves series of connected nodes. Each node is represented by a value and a pointer points to the next node. It is preferred to arrays because each node is allocated dynamically which doesn't take contiguous memory spaces if not used fully can be considered as wasted.
Linked list has many types. The most simpliest one is singly linked list. Other than that, there are doubly linked list, circular linked list.
A disadvantage of linked list is that we cannot access the elements randomly. Instead, have to traverse till meet the elements. Nor can we traverse backwards (for singly list list). This, however, can be done so in doubly or circular list.
An advantage of linked list is insertion and deletion of elements takes constant time. That means it does not change when the data size increases. Since, insertion and deletion can be as easily as breaking the links in list.