标签:roc next ini RoCE ext lin set single proc
struct Node{
Value data;
Node* next;
}
Node* ReverseSingleLinkedList(Node* head){
//inital status
Node* p = head;
Node* q = head;
head = NULL; // initialize new head as NULL
while(p != NULL){
q = p->next; //save p‘s next
p->next = head;
head = p;// set new head
p=q; //to proceed
};
return head;
}
标签:roc next ini RoCE ext lin set single proc
原文地址:https://www.cnblogs.com/wuscier/p/9038332.html