LINKED LIST
What is a LINKED LIST?
A linked list, or one-way list, is a linear collection of data elements, called nodes, where the linear order is given by means of pointers.
That each pointer is divided into two parts :
The first part contains the information of the element, The second part called link field or next_pointer contains the address of the next node in the list.
The next pointer of last node of linked list pointing towards null.
A linked list, whose node contains two fields i) integer value ii) Next Pointer.
Applications of linked list : -
A linked list, or one-way list, is a linear collection of data elements, called nodes, where the linear order is given by means of pointers.
That each pointer is divided into two parts :
The first part contains the information of the element, The second part called link field or next_pointer contains the address of the next node in the list.
The next pointer of last node of linked list pointing towards null.
A linked list, whose node contains two fields i) integer value ii) Next Pointer.
Applications of linked list : -
- Linked List can be used to implements stack, queues.
- Data in a hard drive is stored as a linked list.
- Linked list is a dynamic data structure.
- It allocate the needed memory while program is running in Main Memory (RAM) or in virtual memory.
- Insertion and deletion operation on linked list node are easily implemented.
- Linear data structure are easily executed with a linked list. Ex Stack and Queue.
- Linked List can reduce access time and may expand in real time without memory overhead.
- Linked List waste memory dye to pointers requiring extra storage space.
- Nodes in linked list are only traversed from begin to end or end to begin.
- Nodes in linked list are stored in-contiguously, greatly increasing the time required to access individual elements within the list.
- Can't easily perform binary search on linked list.