What is Linked list in Data structures programming language?
Linked list ?
A linked list is a linear data structure,in which the elements are not stared at contigvous memory location.
A linked list is a dynamic data structures. The no. Of nodes in a list is not fixed and can grow and strink or demand.
Each element is called a node which has two parts -
Information part which stores the information and pointer which point to the next elements.
🖕🖕🖕
Advantage of linked list:---.
Linked list have many advantages .Some of the very important advantage are--
Linked list are dynamic data structures- That is , they can grow or shrink during the execution of a program
Efficient memory utilization - Here , memory is not pre- allocated memory is allocated whenever it is required.And it is deallocated ( removed ) when it is no longer needed.
Insertion and deletions are easier and efficient-
Linked list provide flexibility in inserting a data item at a specified position and deletions of a data item from the given position.
*Many complex applications can be easily carried out with linked lists.
Efficient memory utilization - Here , memory is not pre- allocated memory is allocated whenever it is required.And it is deallocated ( removed ) when it is no longer needed.
Insertion and deletions are easier and efficient-
Linked list provide flexibility in inserting a data item at a specified position and deletions of a data item from the given position.
*Many complex applications can be easily carried out with linked lists.
Disadvantages-
More memory-
If the number of fields are more , then more memory space is needed.
*Access to an arbitrary data item is little bit cumbersome and also time - consuming .
Type of linked list-
Basically there are four types of list.
1-Singly linked list
2-Doubly linked list
3-Circular linked list
4-Circular doubly linked list
Singly linked list-
It's one in which all nodes are linked together in some sequential manner.
It is also called linear linked list.
A singly linked list Doubly linked list--
It's one in which all nodes are linked together by multiple lines which helps is accessing both the successor node (next node ) and predecessor node ( previous node ) with in the list .
The helps to traverse the list in the forward direction and backward direction.
Circular linked list--
It is one which has no beginning and no end .A singly linked list by simply sorting the address of the very first node in the list field of the cast node .
Null not equal to 0
A circular linked list
Circular doubly linked list--
It's one which has both the successor pointer and predecessor pointer in a circular manner.
Keep it up
ReplyDeleteThanks 😊
DeleteVery informative content 👍
ReplyDelete