typedef struct list_node
{
int data;
struct list_node * next;
}LIST_NODE;
struct list_node * list_reverse(list_node *head)
{
struct list_node * new_head = NULL;
while(head)
{
struct list_node * tmp = head;
head = head->next;
tmp->next = new_head;
new_head->next = tmp;
}
return new_head;
}
reverse list
最新推荐文章于 2022-11-17 23:46:21 发布