What is Linked Lists ???
Linked Lists in DSA are the fundamental Data Structure in the field of Computer Science, which consisting a nodes where each node contains a data element and reference ( or link ) to the next node in the sequence. Unlike arrays, linked lists do not store elements in contiguous memory locations, which allow for efficient – insertion and deletions.
Importance
1. Dynamic Size
Linked Lists can easily grow and shrink in size by adding or removing nodes, unlike arrays which have a fixed size.
2. Efficient Insertion/ Deletions
Adding or removing elements in more efficient compared to arrays, as it requires only updating the pointers.
3. Memory Utilization
Linked Lists utilize memory efficiently, especially when the exact size of the data is unknown or changes frequently.
Types of Linked Lists
In DSA Three Types of Linked Lists are Present,
- Singly Linked Lists
- Doubly Linked Lists
- Circular Linked Lists