Add another pointer to the nodes for the previous node:
struct node {
struct node *next;
struct node *previous;
void *data;
};
typedef struct node node;
Then change the logic for insertion and removal to make sure you set the previous pointer as well as the next one.
Copyright © 2026 eLLeNow.com All Rights Reserved.