资源简介
实现两个有序单链表的合并。要求:随机创建两个单链表,实现单链表的排序,再对两个有序单链表进行合并。

代码片段和文件信息
#include
#include
#include
using namespace std;
#include “d_node.h“
#include “function.h“
int main()
{
node * L1 = initRandom(); //初始化随机链表
cout << “The random list 1 as followed:“ << endl;
writelinkedList(L1);
sort(L1); //对随机链表L1进行排序
cout << “The state of list 1 after sorted:“ << endl;
writelinkedList(L1);
node * L2 = initRandom();
cout << “The random list 2 as followed:“ << endl;
writelinkedList(L2);
sort(L2);
cout << “The state of list 2 after sorted:“ << endl;
writelinkedList(L2);
emerge(L1L2); //合并二个有序链表L1L2
cout << “The state of list after emerged:“ << endl;
writelinkedList(L1);
return 0;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 727 2012-03-06 11:27 exp_2\combination.cpp
文件 605 2012-03-02 20:14 exp_2\d_node.h
文件 4396 2012-03-04 00:05 exp_2\exp_2.dsp
文件 535 2012-03-03 14:43 exp_2\exp_2.dsw
文件 50176 2012-03-06 11:29 exp_2\exp_2.ncb
文件 48640 2012-03-06 11:29 exp_2\exp_2.opt
文件 888 2012-03-06 11:27 exp_2\exp_2.plg
文件 3350 2012-03-06 11:27 exp_2\function.h
文件 114688 2012-03-06 11:25 实验二.doc
目录 0 2012-03-06 11:31 exp_2
----------- --------- ---------- ----- ----
224005 10
- 上一篇:米氏理论经典版--包括计算方法
- 下一篇:sobel算子的verilog实现
相关资源
- 分治法快速排序算法QuickSort C
- 利用一个循环队列实现顺序栈重新排
-
xm
l多个文件合并(delphi) - 使用C 实现的教学计划安排检验程序
- 收藏奉献_DOS汉字系统08:WPS 2.3 + CXD
- 收藏奉献_DOS汉字系统03:WPS 2.0 + 金山
- 易语言excel多列排序源码
- fastreport 向下合并单元格 修改文件
- excel合并单元格自适应行高的宏
- 合并多个DLL或EXE 工具+说明.rar
- windows文件夹按体积大小排序软件
- 变权排序法对汽车企业生存能力影响
- 文件合并助手
- 基于Office2007开发的合并会计报表系统
- Excel合并大师破解版.zip
- excel合并大师合并精灵 破解版
- 整理最全资料:并行计算大作业:矩
- lucene.net+盘古分词多条件全文检索并匹
- 仿微信朋友圈图片拖拽排序
- 三维可压缩流场MPI+OpenMP混合并行算法
- 破解手机号码去重排序软件
- M3U8视频PC机64位辅助工具2.0 —&md
- 外排序初始游程的生成
- 梨花众创-微信支付宝收款二维码合
- 算法Flash动画演示46种
- swift-通讯录最简单的中英文混合排序
- apk和odex的合并教程
- dropdownlist+autuocomplete小
- 四级词汇excel表格关联排序法
- 英特尔® 64 和 IA-32 结构软件开发员手
评论
共有 条评论