非递归算法:

    1. {
    2. if (NULL == head)
    3. {
    4. return;
    5. list_node *curr = head;
    6. list_node *next = head->next;
    7. list_node *prev = NULL;
    8. while (next != NULL) {
    9. curr->next = prev;
    10. curr = next;
    11. next = curr->next;
    12. }
    13. curr->next = prev;