摘要: /**归并两路链表*/templateNode* Mylist::merge(Node *first,Node *second){//注意到这里链表first,second已经是顺序的了 Node *resList=new Node(); //开辟一个临时头节点 Node *current; current=resList; while(first!=NULL && second!=NULL){//某一条链表空时结束 if((*cmp )(first->data,second->data)){//根据函数指针来确定排序方式 current->next=firs 阅读全文
posted @ 2014-02-11 17:29 桂皮猪 阅读(331) 评论(0) 推荐(0) 编辑