hi there I have this struct info
struct Node
{
int dest, weight;
struct Node *next;
};
I want to build a function that removes a specific node distance value my main function for calling the delete function will look like this>>
int main()
{
.
.
.
struct Graph *graph;
Node_delete(graph,x);
.
.
.
}
if (x==4)
then the function will delete
every node
that contain the distance
value of 4
if the node in the middle of the previous node will be connected to the next node
and if the node in the last node will be deleted and the previous node will point to null
and so on...
so our graph result will look like this >>
any suggestions on how can I build the delete_node function?