将两个递增链表合并成一个递减链表.docVIP

  • 21
  • 0
  • 约2.57万字
  • 约 3页
  • 2017-08-17 发布于河南
  • 举报

将两个递增链表合并成一个递减链表.doc

将两个递增链表合并成一个递减链表

#include stdio.h #include stdlib.h struct Node {int date; struct Node *next; }Node; goujian(struct Node *L) { struct Node *s,*p; int e;p=L; printf(输入数据:); scanf(%d,e); while(e!=-999) {s=(struct Node *)malloc(sizeof(struct Node)); s-date=e; s-next=p-next; p-next=s; scanf(%d,e); p=s;} } outline(struct Node *L) { struct Node *p; p=L-next; printf(输出数据:); while(p!=NULL) {printf(%d ,p-date); p=p-next; } } hebing(struct Node *h1,struct Node *h2) { struct Node *q,*p,*r,*s; p=h1-next; q=h2-next; r=h1; r-next=NULL; while(p!=NULLq!=NULL) {if(p-dat

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档