Create Doubly_linkedlist.c #1502
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This C program implements a Doubly Linked List (DLL), a linear data structure in which each node contains three parts — data, a pointer to the previous node, and a pointer to the next node. Unlike a singly linked list, a doubly linked list allows bidirectional traversal, enabling easier insertion and deletion from both ends of the list.
The program provides a menu-driven interface that allows users to:
Insert a node at the beginning of the list
Insert a node at the end of the list
Delete a specific node by its value
Display the list in forward order (from head to tail)
Display the list in reverse order (from tail to head)
It uses dynamic memory allocation (malloc) for creating new nodes and ensures that node connections are properly updated during insertions and deletions. The program continues running until the user chooses to exit.
Description of Change
References
Checklist
Notes: