struct node { int key; struct node *next; }; typedef struct node NODE; typedef struct node *PTR;
Fantastic news! We've Found the answer you've been seeking!
Question:
struct node {
int key; struct node *next;
};
typedef struct node NODE;
typedef struct node *PTR;
Write a C function delete_last_occurwith thefollowing header:
void delete_last_occur (PTR *h, int j)
The parameter *h points to a listcontaining nodes of type NODE. When the list isnonempty, several
nodes in the list may have the same value forthe key field. The function should do the following.If
the list contains one or more nodes whose key values areequal to that of the parameter j, thefunction
should delete last node with key valueequal to that of j. If the list does not containany node with
keyvalue equal to that of j, the function should returnwithout modifying the list.
Related Book For
Data Structures Using C A Practical Approach For Beginners
ISBN: 9781000470741
1st Edition
Authors: Amol M Jagtap, Ajit S Mali
Posted Date: