Recursively reverse a linkedlist (code in Stanford CSed library) explanation
问题 My recursion skill is pretty rusty. I've been thinking about this problem and searched the forum for a long time but still cannot understand. Right now I'm looking at the recursively reverse a linked list code from Stanford CS ed library. #include <stdio.h> struct Node { int x; struct Node *next; }; void Reverse(struct Node ** headRef){ struct Node* first; struct Node* rest; if(*headRef==NULL) return; first= *headRef; rest= first->next; if(rest==NULL) return; Reverse(&rest); printf("Rest%d\n"