Question: This is a function to reverse a linked list recursively. Can someone please explain to me how this works? 1 typedef struct node 2 3
This is a function to reverse a linked list recursively. Can someone please explain to me how this works?
1 typedef struct node 2 3 4 ) node; int data; struct node * next 6 node* eFunction (node* aNode) 7 if (aNode == NULL) return NULL; if (aNode-next-= NULL) return aNode ; 10 11 12 13 14 node * rest=eFunction (aNode-next); Node-next-next=aNode ; aNode-next= NULL; return rest
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
