#include <iostream>
using namespace std;
void ReverseList(List L)
{
if(L == NULL)
return;
pNode p = L->next;
L->next = NULL;
while(p)
{
pNode q = p;
p = p->next;
q->next = L->next;
L->next = q;
}
}
using namespace std;
void ReverseList(List L)
{
if(L == NULL)
return;
pNode p = L->next;
L->next = NULL;
while(p)
{
pNode q = p;
p = p->next;
q->next = L->next;
L->next = q;
}
}