A question. How to read a singly linked list backwards? Here is the implementation,
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);
}
Could any guru here help me understand why it works? Thanks a lot.