摘要:
数据结构和算法实践 1 //2.4-2,3,5 2 //get max value in linked list 3 ElemType MaxValue(LNode * head) 4 { 5 if(head==NULL) 6 { 7 cerr<<"Linked list is empty!"<<endl; 8 exit(1); 9 } 10 ElemType max=head->data; 11 LNode* p=head->next;//用temp指针p指向链表 12 while(p!=NULL) 13 { 14 ... 阅读全文