赞
踩
有这样一个结构体:
- struct node{
- int data;
- struct node *next;
- }
- void func(ListNode *head)
- {
- while(head->next != NULL)
- {
- if(head->data < head->next->data)
- head = head->next;
- else
- {
- printf("List is not in ascending order!\n");
- return 0;
- }
- }
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。