Question: 1. The following function is to reverse a singly linked list in place. Please complete the function. typedef struct Node { Elem Type DATA; /*data

 1. The following function is to reverse a singly linked list

1. The following function is to reverse a singly linked list in place. Please complete the function. typedef struct Node { Elem Type DATA; /*data field */ struct Node *LINK; /*pointer/link field*/ }Node; void reverse(Node *HEAD) { Node *p,*q; p=HEAD; p=p->next; HEAD->next=_ ; Il generate an empty new linked list while(p) { 992; p=p->next; q->next=HEAD->next; HEAD->next= ; /* insert the nodes in the old linked list into the front of the new linked list one by one. */ }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!