Describe the feature
Implement all insertion methods for the Circular Linked List. This includes insert_at_begin(Node** head, int data), insert_at_end(Node** head, int data), and insert_at_pos(Node** head, int data, int pos).
It should be implemented because
Insertion is the primary way users build the data structure. In a circular context, this requires unique logic to ensure the last node's next pointer is always updated to point back to the head whenever the head changes or a new tail is added.
Additional context
Goal:
Allow users to add nodes to the circle while maintaining the circular link.
Files to Modify:
- CLL/cll.h: Add function prototypes for insertion.
- CLL/cll.c: Implement the insertion logic.
Specific Task:
In insert_at_begin, ensure you traverse to the last node to update its next pointer to the new head.
Dependency:
- Ensure the logic handles the case where the list is initially empty (*head == NULL)
Would you like to work on this issue?
None
Describe the feature
Implement all insertion methods for the Circular Linked List. This includes insert_at_begin(Node** head, int data), insert_at_end(Node** head, int data), and insert_at_pos(Node** head, int data, int pos).
It should be implemented because
Insertion is the primary way users build the data structure. In a circular context, this requires unique logic to ensure the last node's next pointer is always updated to point back to the head whenever the head changes or a new tail is added.
Additional context
Goal:
Files to Modify:
Specific Task:
Dependency:
Would you like to work on this issue?
None