数据结构与算法课件.pptVIP

  • 0
  • 0
  • 约1.44万字
  • 约 76页
  • 2026-03-27 发布于山东
  • 举报

Linklistcreat(){linklisthead,p1,p2;n=0;p1=p2=(structlnode*)malloc(LEN);scanf(“%d”,p1-data);head-next=NULL;while(p1-data!0){n=n+1;if(n==1)head-next=p1;elsep2-next=p1;p2=p1;p1=(structlnode*)malloc(LEN);scanf(%d”,p1-data);p2-next=NULL;}return(head);}Headp1p2n=015Linklistcreat(){linklisthead,p1,p2;n=0;p1=p2=(structlnode*)malloc(LEN);scanf(“%d”,p1-data);head-next=NULL;while(p1-data!0){n=n+1;if(n==1)head-next=p1;elsep2-next=p1;p2=p1;p1=(structlnode*)malloc(LEN);scanf(%d”,p1-data);p2-next=NULL;}return(head);}Headp1p215∧n=01536元

文档评论(0)

1亿VIP精品文档

相关文档