Linked List�
By
Mr. Abhijit T. Somnathe
What is Link List?
Representation of Link List
Link List V/s Array
Linked List | Array |
Dynamic Size | Fixed Size; Once the size of an array is decided it can not be increased or decreased.. |
Insertions and Deletions are efficient: No shifting. | Insertions and Deletions are inefficient: Elements are usually shifted. |
No random access. It is suitable for operations requiring accessing elements by index such as sorting. | Random access i.e., efficient indexing. |
Since memory is allocated dynamically according to our need, there is no waste of memory. | No memory waste if the array is full or almost full; otherwise may result in much memory waste. |
Sequential access is slow [Reason: Elements not in continuous memory locations] | Sequential access is faster [Reason: Elements in continuous memory locations] |
Types of Linked List
Single Linked List
Double Linked List
Double Linked List
Circular Linked List
Basic Operations on Linked List
Insertion of node in Linked List
Add a node at the front
Add a node after a given node
Add a node at the end
Linked List node Deletion
Linked List node Deletion
Implementation of Stack using Singly Linked List
Implementation of Stack using Singly Linked List
Implementation of Stack using Singly Linked List
Implementation of Stack using Singly Linked List
Implementation of Stack using Singly Linked List
Implementation of Stack using Singly Linked List
Adding a node to the stack (Push Operation)
Adding a node to the stack (Push Operation)
Adding a node to the stack (Push Operation)
Adding a node to the stack (Push Operation)
Deleting a node from the stack (POP operation)
Deleting a node from the stack (POP operation)
Implementation of Queue using Singly Linked List
Implementation of Queue using Singly Linked List
Implementation of Queue using Singly Linked List
Implementation of Queue using Singly Linked List
Implementation of Queue using Singly Linked List
Implementation of Queue using Singly Linked List
Operation on Linked Queue
Operation on Linked Queue
Operation on Linked Queue
Operation on Linked Queue
Operation on Linked Queue
Representation of a Queue using array
Representation of a Queue using array
Representation of a Queue using array
Representation of a Queue using array
Representation of a Queue using array
Representation of a Queue using array
Circular Queue
Circular Queue
Circular Queue
Inserting an Element in a Circular Queue
Inserting an Element in a Circular Queue
Deleting an Element in a Circular Queue
Deleting an Element in a Circular Queue
Deleting an Element in a Circular Queue
Priority Queue
Priority Queue
Priority Queue
Applications of Linked List
Applications of Linked List
Applications of Doubly Linked List
Applications of Circular Linked Lists
Applications of Circular Linked Lists
ANY DOUBTS?