//链表倒置
list *reserve(list *&head)
{
    list 
*phead = head;
    list 
*temp1 = head->next;
    list 
*temp2 = NULL;
    
int count = 0;
    
while(temp1 != NULL)
    
{
        count
++;
        
if(temp1->next == NULL)
        
{
            temp1
->next = phead;
            phead 
= temp1;
            
return phead;
        }

        
else
        
{
            
if(count == 1)
            
{
                phead
->next = NULL;
            }

            temp2 
= temp1->next;
            temp1
->next = phead;
            phead 
= temp1;
            temp1 
= temp2;
        }

    }

    
return phead;
}