i was wondering if anyone could help me under stands the basics of deleting a node from a linked list\
my programs has something like this:
typedef struct car{
int mass;
int x;
int y;
struct car *nextptr;
struct car *lastptr;
} car;
and there are about 500 nodes in my linked list and i need help to find a way to deleted nodes from this linked list, more precisely, when x and y are equal for any of the nodes i want to delete the node with the smaller mass.
my programs has something like this:
typedef struct car{
int mass;
int x;
int y;
struct car *nextptr;
struct car *lastptr;
} car;
and there are about 500 nodes in my linked list and i need help to find a way to deleted nodes from this linked list, more precisely, when x and y are equal for any of the nodes i want to delete the node with the smaller mass.
Comment