struct Node {
int data;
Node* next;
}head;
// Total memory allocation = 4 bytes + next pointer size
= 4 bytes + 8 bytes (on 64-bit machines)
= 12 bytes
Following are the basic operations supported by a linked list.
insertion − Adds an element at the beginning/end/middle of the list.
display − Displays the complete linked list.
search − Searches an element using the given key.
delete − Deletes an element using the given key.
Now in the next blog, I will be witting about the singly linked list with python code. Stay tuned!.
Happy Learning.