Linked List Notes
Linked List Notes
Node
// C Structure to represent a node
info link struct node
{
int info
Data Pointer to struct node *link
};
next node
1
Linked List
Advantages of an array
1. We can access any element of an array directly means random access is easy
2. It can be used to create other useful data structures (queues, stacks)
3. It is light on memory usage compared to other structures
Disadvantages of an array
1. Its size is fixed
2. It cannot be dynamically resized in most languages
3. It is hard to add/remove elements
4. Size of all elements must be same.
5. Rigid structure (Rigid = Inflexible or not changeable)