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

英文网站模板ps做网站首页效果图

英文网站模板,ps做网站首页效果图,蓝德网站建设,虎嗅模板 wordpress合并有序链表 图解代码如下 图解 虽然很复杂,但能够很好的理解怎么使用链表,以及对链表的指针类理解 代码如下 Node* merge_list_two_pointer(List& list1, List& list2) {Node* new_head1 list1.head;Node* new_head2 list2.head;Node* s…

合并有序链表

  • 图解
    • 代码如下

图解

虽然很复杂,但能够很好的理解怎么使用链表,以及对链表的指针类理解
在这里插入图片描述

代码如下

Node* merge_list_two_pointer(List& list1, List& list2)
{Node* new_head1 = list1.head;Node* new_head2 = list2.head;Node* sentinel1 = list1.head;Node* sentinel2 = list2.head;Node* temp_head1 = NULL;Node* temp_head2 = NULL;int flage = 1;//因为下面是<=,所以以list2优先为空if (new_head1->data >= new_head2->data){flage = 2;}while (new_head1 != NULL && new_head2 != NULL){while (list1.head != NULL && list1.head->data < list2.head->data){temp_head1 = list1.head;list1.head = list1.head->next;}//正常两个有序列表,上面为空,//456,123456789if (list1.head == NULL && flage == 2){temp_head1->next = list2.head;return sentinel2;}//特殊情况列表,全大//123,456if (list1.head == NULL){temp_head1->next = new_head2;return sentinel1;}if (temp_head1 != NULL){temp_head1->next = new_head2;}while (list2.head != NULL && list2.head->data <= list1.head->data){temp_head2 = list2.head;list2.head = list2.head->next;}//正常两个有序列表,下面为空//123456789,456if (list2.head == NULL && flage == 1){temp_head2->next = list2.head;return sentinel1;}//特殊情况列表也就是,全小//456,123if (list2.head == NULL){//防止89,89这种类型链表跑空temp_head2->next = list1.head;return sentinel2;}//这里不需要判断这个为空。如果为空,则说明已经到达链表尾部temp_head2->next = list1.head;new_head1 = list1.head;new_head2 = list2.head;}
}
http://www.yayakq.cn/news/80666/

相关文章:

  • 厚街网站建设价格广告设计主要做哪些
  • 酒泉网站建设设计东营造价信息网
  • 网站建设收费标准精英开发公司户型设计会议
  • 如何别人看自己做的网站作网站流程
  • 网站建设有什么系统东四网站建设
  • 不孕不育网站建设总结wordpress文章新窗口打开
  • 镇江网站优化哪家好有了域名怎么建设网站
  • 做辅食网站网站开发团队成员介绍
  • 山东省乡镇网站建设wordpress动态行情页面
  • 怎么做frontpage网站工程公司招聘
  • 建行网站首页登录app制作教程培训
  • 织梦怎么做的网站织梦网站字体
  • 织梦后台搭建网站并调用标签建设做网站高校视频
  • 品牌网站建设的要点c在线编程网站
  • 代做课程设计的网站苏州电子商务网站设计
  • 10m光纤做网站成都花园设计公司
  • 珠海中英文网站建设店群智能营销管理系统
  • 发表评论的wordpress网站模板北京软装设计公司前十名
  • 青岛网站推广招商北京哪有建网站公司或个人的
  • 电子商务做网站商城类网站怎么推广
  • 京东商城网站设计学网站开发要什么基础
  • 网上商城网站建设公司价格对比网站开发
  • 做外贸必须有网站吗韩国网站never
  • 国内做网站最大的公司有哪些老外做摄影网站花多少钱
  • 沙河市建设局网站带视频的网站模板
  • 手机网站搜索wordpress 标题入库
  • 网站和微信 微网站解决方案宿迁网站制作
  • 做网站卖什么发财从零开始做网站
  • 塘厦镇住房规划建设局网站网络公司运营是干啥的
  • 北京建设投标网站爱客crm下载