A question. How to read a singly linked list backwards? Here is the implementation,
Could any guru here help me understand why it works? Thanks a lot.Code:void ReadListBackward(node* head) { node* p = head; if(!p) return; if(p->next) ReadListBackward(p->next); else { printf("%d\n", p->data); return; } printf("%d\n", head->data); }