Skip to content

[FEATURE REQUEST] Issue #3 [CLL]: Deletion & Memory Management #18

@FatinShadab

Description

@FatinShadab

Describe the feature

Implement node removal functions: delete_from_begin(Node** head), delete_from_end(Node** head), and delete_at_pos(Node** head, int pos).

It should be implemented because

Proper memory management is a core goal of this library. Contributors must ensure that every deleted node is properly free()'d and that the circular link remains intact after a node is removed.

Additional context

Goal:

Safely remove data and prevent memory leaks.

Files to Modify:

  • CLL/cll.h: Add function prototypes for deletion.
  • CLL/cll.c: Implement the deletion logic.

Specific Task:

Handle the "Single Node" edge case: if only one node exists, deleting it should set *head = NULL.

Dependency:

  • Always validate the position in delete_at_pos to prevent segmentation faults.

Would you like to work on this issue?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions