主页 > 互联网  > 

【数据结构】周末作业


1.new=(struct list_head*)malloc(sizeof(struct list_head*));

   if(new==NULL)

    {        printf("失败\n");

          return;

    }

new->next=prev->next;

prev->next=new;

      return;

2.struct list_head* p=prev->next;

   prev->next=p->next;

   p->next->prev=prev;

   free(temp);

   temp=NULL;

     return;

3. struct list_head* temp = (struct list_head*)malloc(sizeof(struct list_head*));

   if(temp==NULL)

    {        printf("结点申请失败,插入失败\n");

          return;

    }

      struct list_head* p=head;

      while(p->next!=NULL)

     {          p=p->next;

     }

          temp->next=NULL;

          p->next=temp;

          temp->prev=p;

          return;

4. entry->next->prev=entry->prev;

entry->prev->next=entry->next;

free(entry);

  entry=NULL;

return;

5. if(head->next==NULL)

    {          printf("链表为空\n");

     }

       return;

标签:

【数据结构】周末作业由讯客互联互联网栏目发布,感谢您对讯客互联的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人网站或者朋友圈,但转载请说明文章出处“【数据结构】周末作业