当前位置: 首页 > news >正文

【数据结构】周末作业

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;

相关文章:

  • web组态(BY组态)接入流程
  • 4 局域网基础(2)
  • 11.以太网交换机工作原理
  • centos服务配置springboot服务开机启动
  • 第一章 Win10系统VM安装Ubuntu1704虚拟机
  • VUE 入门及应用 ( Axios )
  • 【vue】vue 是怎么把 template 模版编译成 render 函数的,什么是AST抽象语法树
  • 1.QT简介(介绍、安装,项目创建等)
  • 【MySQL】_内连接
  • 【论文阅读】深度学习在过冷沸腾气泡动力学分割中的应用
  • python dictionary 字典中的内置函数介绍及其示例
  • leetcode刷题(剑指offer) 47.全排列Ⅱ
  • Python入门到精通(九)——Python数据可视化
  • 【小沐学QT】QT学习之信号槽使用
  • 人工智能_大模型010_Centos7.9中CPU安装ChatGLM3-6B大模型_安装使用_010---人工智能工作笔记0145
  • 后端实现跨域(三种方式)
  • 【Java程序设计】【C00329】基于Springboot的高校实习管理系统(有论文)
  • 【大数据】-- dataworks 创建odps 的 hudi 外表
  • 森林监测VR虚拟情景再现系统更便利
  • 【C++】认识类和对象
  • 航海王亚洲巡展、工厂店直销……上海多区推出“五五购物节”活动
  • 山西太原一小区发生爆炸,造成1人遇难21人受伤2人失联
  • “五一”逃离城市计划:带上帐篷去大自然里充电
  • 王毅:时代不容倒退,公道自在人心
  • 光明网评“泉州梦嘉商贸楼不到5年便成危楼”:监管是否尽职尽责?
  • “人工智能是年轻的事业,也是年轻人的事业”,沪上高校师生畅谈感想