CSE 2001 - Data Structures and Algorithms: Module 2: Linear Data Structure-Linked List
CSE 2001 - Data Structures and Algorithms: Module 2: Linear Data Structure-Linked List
Algorithms
Module 2: Linear Data Structure- Linked List
1
Contents
• Linked List
• Singly Linked List
• Operation on the linear list using singly linked storage
structures
• Circular List
• Applications of Linked list.
2
Drawback of Arrays
Fixed Size
• Arrays have a fixed size once initialized
• Either waste memory if the array is too large or require resizing if
the array becomes too small.
Expensive Insertions/Deletions
• In arrays, inserting or deleting elements requires shifting
elements, which can be costly (O(n) time complexity
3
Drawback of Arrays
Memory Wastage
• Arrays allocate memory for all elements upfront, even if not all are
used
Inefficient Memory Usage in Large Arrays
• Large arrays may cause memory fragmentation because they
require contiguous memory allocation
No Efficient Support for Variable-Sized Data
• Arrays are not well-suited for handling variable-sized data
4
Demonstration of insertion-deletion
operations in arrays