CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - c l
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Sub Category
Compress-Decompress algrithms
STL
Data structs
Algorithm
AI-NN-PR
matlab
Bio-Recognize
Crypt_Decrypt algrithms
mathematica
Maple
DataMining
Big Data
comsol
physical calculation
chemical calculation
simulation modeling
Search - c l - List
[
Data structs
]
grap
DL : 0
—图数据类型的实现——问题描述:图是一种较线性表和树更为复杂的数据结构。在图形结构中,结点之间的关系是任意的,任意两个数据元素之间都可能相关,因此,图的应用非常广泛,已渗入到诸如语言学‘逻辑学、物理、化学、电讯工程、计算机科学及数学的其它分支中。因此,实现图这种数据类型也尤为重要,在该练习中即要实现图的抽象数据类型。基本要求:2、 定义出图的ADT;3、 采用邻接矩阵及邻接表的存储结构(有向图也可使用十字链表)实现以下操作:a. 构造图 b. 销毁图 c. 定位操作d. 访问图中某个顶点的操作e. 给图中某个顶点赋值的操作f. 找图中某个顶点的第一个邻接点g. 找出图G中顶点v相对于w的下一个邻接点h. 在图G中添加新顶点vi. 删除图G中顶点vj. 在图G中插入一条边k. 在图G中删除一条边l. 实现图的深度遍历操作m. 实现图的广度遍历操作参考提示:具体内容参看教科书本156页实验要求:对于以上具体操作要求实现时有良好的用户交互界面。详细设计、编码、测试。-2 ADT3 a. b. c. d. e. f. g. Gvwh. Gvi. Gvj. Gk. Gl. m.
Date
: 2025-12-27
Size
: 2kb
User
:
水寒
[
Data structs
]
LocateElem
DL : 0
/* shiyan.c 第四组数据结构实验作业。Author:zhg 功能:本程序用于验证函数 LocateElem(L,e,compare()) 。即求出现行表中元素的位序。 程序中的线性表采用顺序存储,以更方便于该操作的实现。 */ -/* shiyan.c fourth group structure of the experimental data. Author : zhg function : This procedure is used to validate function LocateElem (L, e, compare ()). Calculated that the existing table spaces sequence elements. Procedures using the linear sequence of storage, in a more convenient to the realization of the operation.* /
Date
: 2025-12-27
Size
: 12kb
User
:
zhg
[
Data structs
]
greedy
DL : 0
(1).问题描述:集装箱的装箱问题 给定一个集装箱,其长为L,宽为W和高为H,现有一批圆柱形木材,每根木材的长均为L,但是半径不同,设第i根木材半径为ri。问如何装箱,使得集装箱的空间利用率最高? (2).程序设计要求: a. 设计一个贪心算法 b. 任给一个输入实例,能输出集装箱的空间利用率 c. 能用图形演示装箱的过程 演示: 输入要测试的文件名,如c17.txt,程序将给出结果,并用图形演示。-err
Date
: 2025-12-27
Size
: 13kb
User
:
小明
[
Data structs
]
RBTree
DL : 0
数据结构中红黑树的C语言实现,包括红黑的各种基本操作,有左旋、右旋、插入等。-Red and black tree data structure in the C language, including red, black and a variety of basic operations, there are L, D, insert, etc..
Date
: 2025-12-27
Size
: 191kb
User
:
蔡砚成
[
Data structs
]
c
DL : 0
#include<malloc.h> #include<limits.h> #include<stdio.h> #include<graphics.h> #include<io.h> #include<math.h> #include<process.h> #include<conio.h> #define m 100 #define OK 1 typedef int Status typedef char TElemType /*树元素的类型*/ int t=35 int n=20 int h=14 int u=2 int leaf=0,non_l_leaf=0,non_r_leaf=0,root=0 /*各种结点数*/ char le[m],l[m],r[m],ro[m] /*用与存放各种结点*/ typedef struct BiTNode/*定义二叉树*/-# Include
Date
: 2025-12-27
Size
: 2kb
User
:
全文
[
Data structs
]
huffman
DL : 0
实现最优二叉树的构造;在此基础上完成哈夫曼编码器与译码器。 假设报文中只会出现如下表所示的字符: 字符 A B C D E F G H I J K L M N 频度 186 64 13 22 32 103 21 15 47 57 1 5 32 20 57 字符 O P Q R S T U V W X Y Z , . 频度 63 15 1 48 51 80 23 8 18 1 16 1 6 2 要求完成的系统应具备如下的功能: 1.初始化。从终端(文件)读入字符集的数据信息,。建立哈夫曼树。 2.编码:利用已建好的哈夫曼树对明文文件进行编码,并存入目标文件(哈夫曼码文件)。 3.译码:利用已建好的哈夫曼树对目标文件(哈夫曼码文件)进行编码,并存入指定的明文文件。 4.输出哈夫曼编码文件:输出每一个字符的哈夫曼编码。
Date
: 2025-12-27
Size
: 129kb
User
:
张娟
[
Data structs
]
data_structure
DL : 0
数据结构与程序设计——C++语言描述(影印版)习题的答案 【作 者】Robert L.Kruse,Alexander J.Ryba -Data Structure and Program Design- C++ language description (photocopy edition) Exercise the answer 【作者】 Robert L. Kruse, Alexander J. Ryba
Date
: 2025-12-27
Size
: 2.43mb
User
:
hu jin
[
Data structs
]
Haffmancode
DL : 0
课程设计: 1.求出在一个n×n的棋盘上,放置n个不能互相捕捉的国际象棋“皇后”的所有布局。 2.设计一个利用哈夫曼算法的编码和译码系统,重复地显示并处理以下项目,直到选择退出为止。 【基本要求】 1) 将权值数据存放在数据文件(文件名为data.txt,位于执行程序的当前目录中) 2) 分别采用动态和静态存储结构 3) 初始化:键盘输入字符集大小n、n个字符和n个权值,建立哈夫曼树; 4) 编码:利用建好的哈夫曼树生成哈夫曼编码; 5) 输出编码; 6) 设字符集及频度如下表: 字符 空格 A B C D E F G H I J K L M 频度 186 64 13 22 32 103 21 15 47 57 1 5 32 20 字符 N O P Q R S T U V W X Y Z 频度 57 63 15 1 48 51 80 23 8 18 1 16 1 -Curriculum design: 1. Obtained in an n × n chessboard, the place to catch each other should not n个chess "Queen" of all the layout. 2. The design of a use of Huffman coding and decoding algorithms systems, and deal with duplicate to show the following items until the exit date selection. The basic requirements 【】 1) will be the right value data stored in data files (file named data.txt, located in the implementation of procedures in the current directory) 2), respectively, dynamic and static storage structure 3) Initialization: keyboard input character set size of n, n and n characters of the right value, set up Huffman tree 4) Coding: Using the built Huffman tree generated Huffman coding 5) output coding 6) The character set and the frequency of the following table: Space characters A B C D E F G H I J K L M Frequency of 186 64 13 22 32 103 21 15 47 57 1 5 32 20 Character N O P Q R S T U V W X Y Z Frequency 57 63 15 1 48 51 80 23 8 18 1 16 1
Date
: 2025-12-27
Size
: 538kb
User
:
赵刚
[
Data structs
]
hw1
DL : 0
The project#1 calculates all possible routes from A to L of the map using C language. The input is the matrix from developing the map of a subway system. In the matrix, the one stands for the two points are connected, and the zero stands for the two points are not connected. The output will list all possible routes from A to L and then tell you the number of all possible routes is.
Date
: 2025-12-27
Size
: 6kb
User
:
chung
[
Data structs
]
chessboard
DL : 0
用C++语言实现棋盘覆盖分治算法 在一个2k×2k 个方格组成的棋盘中,恰有一个方格与其它方格不同,称该方格为一特殊方格,且称该棋盘为一特殊棋盘。在棋盘覆盖问题中,要用4种不同形态的L型骨牌覆盖给定的特殊棋盘上除特殊方格以外的所有方格-C++ language with the board divided coverage of a 2k × 2k Algorithm in the composition of the board of squares, just a different box with the other box, saying that the box is a special box, and said the board is a special board. Cover problem in the board, the use of 4 different forms of L-type domino given special coverage on the board except in special box outside of all boxes
Date
: 2025-12-27
Size
: 1kb
User
:
kyc
[
Data structs
]
c
DL : 0
用顺序和二叉链表作存储结构 ,完成学生成绩管理 1) 以回车( \n )为输入结束标志,输入数列L,生成一棵二叉排 序树T; 2) 对二叉排序树T作中序遍历,输出结果; 3) 输入元素x,查找二叉排序树T,若存在含x的结点,则删除该结点,并作中序遍历(执行操作2);否则输出信息“无x”; -susau
Date
: 2025-12-27
Size
: 9kb
User
:
章红建
[
Data structs
]
tree
DL : 0
假设以如下说明的三元组 (F、C、L/R) 序列输入一棵二叉树的诸边(其中 F 表示双亲结点的标识,C 表示孩子结点标识,L/R 表示 C 为 F 的左孩子或右孩子),且在输入的三元组序列中,C 是按层次顺序出现的。设结点的标识是字符类型。F=‘^’时 C 为根结点标识,若 C 亦为‘^’,则表示输入结束。试编写算法,由输入的三元组序列建立二叉树的二叉链表,并以中序序列输出。 ^AL ABL ACR BDL CEL CFR DGR FHL ^^L -Assuming the following description of the triple (F, C, L/R) sequence of a binary tree of all the input side (where F that identifies the parent node, C, said child node ID, L/R that C is F, left or right child child), and triples in the input sequence, C is the emergence of a hierarchical order. Node identity is established character types. F = ' ^' C for the root identity when, if C is also a ' ^' , then enter the end. Test preparation algorithm, the input sequence of triples binary build the binary tree list, and in order to sequence the output. ^ AL ABL ACR BDL CEL CFR DGR FHL ^ ^ L
Date
: 2025-12-27
Size
: 1kb
User
:
tesla
[
Data structs
]
program
DL : 0
链表 删除的C 数据结构 严蔚敏的书,清华出版-Delete L删除等线性表元素,数据结构书中代码
Date
: 2025-12-27
Size
: 2.53mb
User
:
yc
[
Data structs
]
DBMM
DL : 0
单表密码 定义: 1、 明表: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2、 明文 they will arrive tomorrow 3、 密钥 K=Monday 4、 密码实现 1) 将明文与密钥转为数字串: K=(12,14,13,3,0,24) M=(19,7,4,24,22,8,11,11,0,17,17,8,21,4,19,14,12,14,17,17,14,22,) 2)将明文数字串依密钥长度分段,并逐一与密钥数字相加(模26),得到密文数字串。 19 7 4 24 22 8… 12 14 13 3 0 24… 5 21 17 1 22 6 C=(5,21,17,1,22,6,23,25,13,20 。。。) 3) 密文数字串转换为字母串 c=(FVRBWG XZNURG HSGRMM DFBZ) 5、 解密:模26减运算 1) C=(5,21,17,1,22,6,23,25,13,20 。。。) 2)模26减运算 5 21 17 1 22 6 — 12 14 13 3 0 24… -7 7 4 -2 22 -18 + 26 26 26 26 26 26 M=(19 7 4 24 22 8…) 3)将M转换为字符串,得到明文。 they will arrive tomorrow-Single table code
Date
: 2025-12-27
Size
: 4kb
User
:
lss
[
Data structs
]
datastruct-source
DL : 0
“Data Structures and Program Design in C++”,Robert L. Kruse and Alexander J. Ryba ,高教出版社,2001年。中山大学软件学院数据结构教科书的源代码 -"Data Structures and Program Design in C++", Robert L. Kruse and Alexander J. Ryba, Higher Education Press, 2001. The source code of the Software Institute of Zhongshan University data structures textbooks
Date
: 2025-12-27
Size
: 50kb
User
:
majiahai
[
Data structs
]
Mergerandarray
DL : 0
可按如下所述实现归并排序:假设序列中有k个长度为小于等于L的有序子序列。利用过程merge(参见教科书10.5)对它们进行两两归并,得到[k/2]个长度小于等于2l的有序子序列,称为一趟归并排序。反复调用一趟归并排序过程,使有序子序列的长度自l=1开始成倍的增加,直至使整个序列成为一个有序序列。是对序列实现上述归并排序的递推算法,并分析你的算法的时间复杂度。 本程序包含四个模块: 1. 主程序模块: void main() {初始化序列; 对序列归并排序; 输出序列; } 2. 归并排序的模块:实现序列的排序; 3. 序列基本操作模块:实现序列的输入,输出; 4. 结点结构单元模块:定义序列的结点结构。 -Merger and array with c
Date
: 2025-12-27
Size
: 11kb
User
:
啊
[
Data structs
]
alogo2-1
DL : 0
一 ..编写一个程序alogo2-1.cpp,实现顺序表的各种基本运算,并在此基础上设计一个主程序完成如下功能: (1) 初始化顺序表L (2) 依次采用尾插法插入a,b,c,d,e元素; (3)输入顺序表L (4) 输出顺序表L长度; (5)判断顺序表是否为空; (6)输出顺序表的底3个元素; (7)输出元素a的位置; (8) 在第4个元素位置上插入f元素; (9)输出顺序表L (10)删除表的第3个元素; (11)输出顺序表; (12)释放顺序表; -A.Write a program alogo2-1.cpp, a variety of basic operations in the order table, and on this basis to design a main program performs the following functions: (1) The initialization sequence table L (2) followed by the end of interpolation into a, b, c, d, and e-elements (3) The input sequence tables L (4) The output sequence table L length (5) to determine whether the sequence table is empty (6) of the output sequence table of the end of three elements (7) The output element of a position (8) into the f elements in the four elements position (9) the output sequence table L (10) delete the first three elements (11) the output sequence table (12) to release the order table
Date
: 2025-12-27
Size
: 1kb
User
:
冯书娇
[
Data structs
]
test
DL : 0
实对称正定矩阵LD和UD分解,即A=LDL^或A=UDU^,其中L为单位下三角矩阵,U为单位上三角矩阵,L^和U^分别是L和U的转置矩阵,代码自己写的,C++,学工科的同学可能会用到这两个分解,算法也有,可以-Real symmetric positive definite matrix LD and UD decomposition, that is A = LDL^ = UDU ^ where L is unit lower triangular matrix, U as a unit triangular matrix, and U ^ L ^ L and U were the transpose of the matrix, to write their own code, C++, science and engineering students may use this two decomposition, algorithm also has, can have a look
Date
: 2025-12-27
Size
: 1012kb
User
:
李昕
[
Data structs
]
22
DL : 0
1、已知带头结点的动态单链表L中的结点是按整数值递增排序的,试写一算法将值为x的结点插入到表L中,使L仍然有序。 2、设计一算法,逆置带头结点的动态链表L。要求利用原表的结点空间,并要求用尽可能少的时间完成。 3、假设有两个按元素值递增有序的线性表A和B,均以单链表作存储结构,试编写算法将A表和B表归并成一个按元素值递减有序的线性表C,并要求利用原表的空间存放C。 -1, the node is known to take the lead in junction dynamic single list L Ascending integer value, trial writing an algorithm to the junction point of the value x is inserted into the table L, so that L remains orderly. 2, the design of an algorithm, the inverse is set to take the lead junction dynamic list L. Require the use of a node of the original table space, and require as little time as possible to complete. 3, assuming two increments ordered linear element values in Table A and B are single linked list for storage structures, try to write algorithms to Table A and Table B merge into a descending order linear element values table C, and requires the use of the storage space of the original table C.
Date
: 2025-12-27
Size
: 2.8mb
User
:
wenzi
[
Data structs
]
tree_sanyuanzu
DL : 0
假设以如下说明的三元组 (F、C、L/R) 序列输入一棵二叉树的诸边(其中 F 表示双亲结点的标识,C 表示孩子结点标识,L/R 表示 C 为 F 的左孩子或右孩子),且在输入的三元组序列中,C 是按层次顺序出现的。设结点的标识是字符类型。F=‘^’时 C 为根结点标识,若 C 亦为‘^’,则表示输入结束。试编写算法,由输入的三元组序列建立二叉树的二叉链表,并以中序序列输出。 -Assumed that the input to the following description of the ternary group (F, C, L/R) sequence of a binary tree plurilateral (wherein F represents the identity of the parent node, C represents the identity of the child node represents C, L/R F, The left child or right child), and the sequence of the input triples, C is a hierarchical order appears. The set node identification is a character type. F = ' ^' C is the root node identification, if C is also a ' ^' , it indicates the end of input. Try to write algorithms, the establishment of a binary tree binary list by the triples sequence input, and output inorder sequence.
Date
: 2025-12-27
Size
: 1kb
User
:
shiloh
«
1
2
»
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.