Starting from:
$30

$24

Assignment 5 solution

Questions




(100 points) You are to implement a function: Node *my reverse(Node *head) that reverses a list beginning at Node *head. The return value of this function is a pointer to the head of the newly-reversed linked list. A linked list is a collection of Nodes that are connected to each other using pointers. The last node in a list points to NULL.






The following definition of a Node is provided in define.h, and may not be modified in your submission:

struct _Node {




union {




int n;




char c;




} val; void *ptr; int var;




};




typedef struct _Node Node;

More products