write the various opeations(insertion,deletion) of LL?
Sigiloso
1. Insertion Operations: Insert at the Beginning: Allocate a new node, point its next to the current head, and update the head to the new node. Insert at the End: Traverse to the last node, allocate a new node, and set the last node’s next to this new node. Insert After a Given Node: Find the node, allocate a new node, set its next to the next of the found node, and update the found node’s next. 2. Deletion Operations: Delete from the Beginning: Move the head pointer to the next node and free the old head. Delete from the End: Traverse to the second last node, set its next to NULL, and free the last node. Delete a Given Node (by value): Search for the node with the given value, adjust pointers to exclude it from the list, and free its memory.