联合开发网   搜索   要求与建议
                登陆    注册
排序按匹配   按投票   按下载次数   按上传日期
按分类查找All 数据结构(17) 
按平台查找All C/C++(17) 

[数据结构] Shannon

Shannon编码步骤: 1、将信源符号按概率从大到小的顺序排列,     p(a1)≥ p(a2)≥…≥ p(an) 2、确定满足下列不等式的整数Ki, -log2 p(ai) ≤ Ki < 1-log2 p(ai) 3、令P(a1)=0,用Pi表示第i个码字的累加概率, Pi=sum_{k=1}^{i-1} p(ak) 4、将Pi用二进制表示,并取小数点后Ki位作为符号ai的编码。
Shannon coding steps: 1. The source symbols are arranged in order of probability from large to small 2. Determine the integer ki satisfying the following inequality 3. Let P(A1)= 0, and PI denotes the cumulative probability of the i-th codeword, 4. PI is represented in binary system,and Ki bit after decimal point is taken as the code of symbol AI. (2020-09-06, C/C++, 1KB, 下载0次)

http://www.pudn.com/Download/item/id/1599380419412666.html

[数据结构] main.cpp

AVL树有不同的版本。通过初始化一个空的AVL树来启动您的程序。程序接受一行作为输入。输入行包含n个“修改移动”,用空格分隔(1≤n≤100)。可用的 修改举措 ?Aint(字符A后跟一个1到100之间的int值):A3表示将值3插入AVL树中。如果3已经在树中,什么都不做。 ?Dint(字符D后跟1到100之间的int值):D3表示将值3删除到AVL树中。如果3不在树中,什么都不做。 然后,在输入之后正好有一个完成步骤(PRE或POST或IN):如果完成步骤是PRE,那么应该按预先顺序打印出树(在当前情况下)。如果树为空,则打印为空。否则,打印用空格分隔的值。POST和IN的处理方式类似。 不需要担心无效的输入。样本输入1:A1 A2 A3 IN 示例输出1:1 2 3 样本输入2:A1 A2 A3 PRE 样本输出2:2 1 3样本输入3:A1 D1 POST样本输出3:空
There are different versions of AVL trees. Start your program by initializing an empty AVL tree. The program accepts one line as input. The input line contains n "modify moves" separated by Spaces. The available Modification measures (2020-08-25, C/C++, 1KB, 下载0次)

http://www.pudn.com/Download/item/id/1598322254473231.html

[数据结构] train

A为入口,B为出口,S为中转盲端。所有铁道均为单轨单向式:列车行驶的方向只能是从A到S,再从S到B;也可以不在S中驻留,直接从A驶向B;另外,不允许超车。因为车厢可在S中驻留,所以它们从B端驶出的次序,可能与从A端驶入的次序不同。不过S的容量有限,同时驻留的车厢不得超过m节。 设某列车由编号依次为{a1, a2, ..., an}的n节车厢组成。调度员希望知道,按照以上交通规则,这些车厢能否以{1, 2, ..., n}的次序,重新排列后从B端驶出。
train traffic problem (2018-12-24, C/C++, 1KB, 下载2次)

http://www.pudn.com/Download/item/id/1545637223147934.html

[数据结构] shunxubiaonizhi

对顺序表元素就地逆置,将线性表(a1,a2,……,an)逆置为(an,an-1,……,a1)。
The sequential table element is placed in place, and the linear table (A1, A2,... An) inversed (an, an-1,... A1). (2018-01-13, C/C++, 489KB, 下载1次)

http://www.pudn.com/Download/item/id/1515827981279942.html

[数据结构] stone_game_dp

现有4堆石子,两个人轮流取石子,他们有n种可能的取法,取法表示从第1堆取A1个石子,从第2堆中取B1个,第3堆取C1个,第4堆取D1个.如果取的时候某一堆的石子数比所要取的石子数要少,则这种取法是不可行的.取到最后没有可行取法的人就算输了. 现给出4堆石子的石子数目以及n种取法,请问如果两个人都采用最优取法,先取的人是赢还是输.
Four existing heap of stones, two people take turns stones, they have emulated n possible, take the A1 emulated said a stone from a pile of rubble taken from the second B1, 3rd stacker C1, 4th heap Take a D1 and if it' s a pile of stones take a few less than the number of stones to take it, then this is not feasible emulated Take to the last man, even if there is no feasible emulated lost. heap of stones now gives 4 n kinds of stones as well as the number of emulated, what if two people are using the optimal emulated, first take the people win or lose. (2013-11-26, C/C++, 1KB, 下载1次)

http://www.pudn.com/Download/item/id/2409636.html

[数据结构] gene

基因串是由一串有限长度的基因所组成的,其中每一个基因都可以用26个英文大写字母中的一个来表示,不同的字母表示不同的基因类型。一个单独的基因可以生长成为一对新的基因,而可能成长的规则是通过一个有限的成长规则集所决定的。每一个成长的规则可以用三个大写英文字母A1A2A3来描述,这个规则的意思是基因A1可以成长为一对基因A2A3。 用大写字母S来表示一类称作超级基因的基因,因为每一个基因串都是由一串超级基因根据给出的规则所成长出来的。 请写一个程序,读入有限条成长的规则和一些我们想要得到的基因串,然后对于每个基因串,判断它是否可以由一个有限长度的超级基因串成长得出。如果可以,给出可成长为该基因串的最短超级基因串的长度。
Gene by a gene string is a string that consists of finite length, wherein each gene can be used in the 26 capital letters to indicate a different type of letters different genes. A single gene may be grown to be a new gene, the rule is likely to grow by a limited set of rules determined by the growth. Each rule can be used to grow three capital letters A1A2A3 to describe the meaning of the rule A1 gene is a gene can grow A2A3. Uppercase letter S to represent a class of genes called super-gene as a gene sequence are each composed of a string of super-gene grown out according to the given rules. Please write a program that reads the limited growth of the rules and want to get some of our gene cluster, and then for each gene cluster, to determine whether it is the growth of super-gene cluster consists of a finite length can be derived. If you can, given the length of the shortest that can grow super-gene cluster of genes strings. (2013-11-26, C/C++, 1KB, 下载1次)

http://www.pudn.com/Download/item/id/2409623.html

[数据结构] yls

1. 题目 采用顺序存储结构定义实现抽象数据类型NUM。 有理数的抽象数据类型定义如下: ADT NUM { 数据对象: D = { <a1, a2> |a1, a2∈整数 } 数据关系: R = { <a1, a2> |a1是有理数的分子,a2是有理数的分母,且a2不等于0 } 基本操作: IniteIpt() 初始条件:输入2~4个数字。 操作结果:生成两个有理数。 plus(first, second) 初始条件:有理数first和有理数second存在。 操作结果:返回有理数first加上second的结果。 reduce(first, second) 初始条件:有理数first和有理数second存在。 操作结果:返回有理数first减去second的结果。 multiplus(first, second) 初始条件:有理数first和有理数second存在。 操作结果:返回有理数first乘上second的结果。 divide(first, second) 初始条件:有理数first和有理数second存在。 操作结果:返回有理数first除以second的结果。 zfs(yls, &fz, &fm) 初始条件:yls为有理数。 操作结果:返回有理数的分子fz和分母fm。 } ADT NUM
1 topic Achieved using sequential storage structure defined abstract data types NUM. Rational abstract data types are defined as follows: ADT NUM { Data object: D = {<a1, a2> | a1, a2 ∈ integer} Data relationship: R = {<a1, a2> | a1 is a rational number of molecules, a2 is the denominator of the rational numbers, and a2 is not equal to 0} Basic operations: IniteIpt () Initial conditions: Input 2 to 4 digits. Result: Generate two rational numbers. plus (first, second) Initial conditions: rational first and second rational existence. Result: Returns the result of rational first plus second. reduce (first, second) Initial conditions: rational first and second rational existence. Result: Returns the result of rational first subtracting the second. multiplus (first, second) Initial conditions: rational first and second rational existence. Result: Returns rational first multiplied second result. divide (first, second) Initial conditions: rational first and sec (2013-06-30, C/C++, 1072KB, 下载1次)

http://www.pudn.com/Download/item/id/2292724.html

[数据结构] merge

分治法排序,给定长度为n的一个序列,对其进行快速排序和求第i小数
(1) Input: A sequence of n numbers <a1, a2, . . .,an>. Output: A permutation (reordering) <a1’, a2’, . . .,an’> of the input sequence such that a1’ a2’  . . .  an’ (2) Input: A set A of n (distinct) numbers and a number i, with 1 ≤ i ≤ n. Output: The element x∈ A that is larger than exactly i- 1 other elements of A. (2011-12-31, C/C++, 2485KB, 下载4次)

http://www.pudn.com/Download/item/id/1747929.html

[数据结构] insert

随机生成10000个数使用快速排序,插入排序,和归并排序并保存文件,并且输出各自的运算时间
Input: A sequence of n numbers <a1, a2, . . .,an>. Output: A permutation (reordering) <a1’, a2’, . . .,an’> of the input sequence such that a1’ a2’  . . .  an’ (2011-12-31, C/C++, 2485KB, 下载6次)

http://www.pudn.com/Download/item/id/1747920.html

[数据结构] E6

SSD 6 e6作业答案 绝对好用 欢迎大家下载使用
SSD 6 e6 answer is absolutely easy to use operating (2011-12-21, C/C++, 19KB, 下载3次)

http://www.pudn.com/Download/item/id/1737975.html

[数据结构] BF_KMP

BF与KMP算法的比较,通过计算时间进行比较。C语言实现。
compare BF and KMP using C. (2011-10-20, C/C++, 13KB, 下载6次)

http://www.pudn.com/Download/item/id/1674484.html

[数据结构] dynamic-planning

给定n个矩阵{A1,A2,…,An},其中Ai与Ai+1是可乘的,i=1,2,…,n-1。考察这n个矩阵的连乘积A1A2…An。由于矩阵乘法满足结合律,故计算矩阵的连乘积可以有许多不同的计算次序,这种计算次序可以用加括号的方式来确定。
Given n matrices {A1, A2, ..., An}, where Ai and Ai+1 is a mere of, i = 1,2, ..., n-1. Study the n matrix with the product A1A2 ... An. Since matrix multiplication to meet with law, so the calculation of the matrix with the product can have many different ways to calculate the order, the order of this calculation can be used to determine the way in parentheses. (2011-06-23, C/C++, 1KB, 下载2次)

http://www.pudn.com/Download/item/id/1577697.html

[数据结构] kuaipai

1. 按下述原则编写快排的非递归算法: (1)一趟排序之后,若子序列已有序(无交换),则不参加排序,否则先对长度较短的子序列进行排序,且将另一子序列的上、下界入栈保存; (2)若待排记录数?3,则不再进行分割,而是直接进行比较排序。 测试实例:{49 38 65 97 76 13 27 49 88 21 105}
1. Prepared by the following principles of non-recursive algorithm for fast row: (1) After a trip to sort, if the sequence has been ordered (no exchange), not to participate in order, otherwise the first sub-sequence of shorter length sort, and will Another sequence of upper and lower stack saved (2) if the number of records to be ranked ? 3, then no longer be divided, but a direct comparison sort. Test Case: {49 3,865,977,613,274,988 21 105} (2010-12-25, C/C++, 1KB, 下载8次)

http://www.pudn.com/Download/item/id/1392831.html

[数据结构] fenkuaichazhao

试编写利用折半查找确定记录所在块的分块查找算法。 提示:1. 读入各记录建立主表; 2. 按L个记录/块建立索引表; 3. 对给定关键字k进行查找; 测试实例:设主表关键字序列:{12 22 13 8 28 33 38 42 87 76 50 63 99 101 97 96},L=4 ,依次查找K=13, K=86,K=88
Trial preparation records using binary search to determine where the block block search algorithm. Note: 1. Read into the record to establish the main table 2. By L record/block index table 3. K for a given keyword search test case: set the main table key sequence: {1,222,138 28 33 38 42 87 76 50 63 99 101 97 96}, L = 4, in order to find K = 13, K = 86, K = 88 (2010-12-25, C/C++, 1KB, 下载19次)

http://www.pudn.com/Download/item/id/1392828.html

[数据结构] DataStructure_Search

1.6.1 顺序表的查找 273 范例1-94 顺序表的查找 273 ∷相关函数:Search_Seq函数 1.6.2 静态树表的查找 276 范例1-95 静态树表的查找 276 ∷相关函数:Search_SOSTree函数 1.6.3 二叉排序树的基本操作 280 范例1-96 二叉排序树的基本操作 280 ∷相关函数:InsertBST函数 1.6.4 平衡二叉树的基本操作 285 范例1-97 平衡二叉树的基本操作 285 ∷相关函数:SearchBST函数 1.6.5 B树的基本操作 290 范例1-98 B树的基本操作 290 ∷相关函数:SearchBTree函数 1.6.6 按关键字符串的遍历双链键树 295 范例1-99 按关键字符串遍历双链键树 295 ∷相关函数:SearchDLTree函数 1.6.7 按关键字符串的遍历Trie树 301 范例1-100 按关键字符串遍历Trie树 301 ∷相关函数:SearchTrie函数 1.6.8 哈希表的基本操作 306 范例1-101 哈希表的基本操作 306 ∷相关函数:SearchHash函数
1.6.1 顺序表的查找 273 范例1-94 顺序表的查找 273 ∷相关函数:Search_Seq函数 1.6.2 静态树表的查找 276 范例1-95 静态树表的查找 276 ∷相关函数:Search_SOSTree函数 1.6.3 二叉排序树的基本操作 280 范例1-96 二叉排序树的基本操作 280 ∷相关函数:InsertBST函数 1.6.4 平衡二叉树的基本操作 285 范例1-97 平衡二叉树的基本操作 285 ∷相关函数:SearchBST函数 1.6.5 B树的基本操作 290 范例1-98 B树的基本操作 290 ∷相关函数:SearchBTree函数 1.6.6 按关键字符串的遍历双链键树 295 范例1-99 按关键字符串遍历双链键树 295 ∷相关函数:SearchDLTree函数 1.6.7 按关键字符串的遍历Trie树 301 范例1-100 按关键字符串遍历Trie树 301 ∷相关函数:SearchTrie函数 1.6.8 哈希表的基本操作 306 范例1-101 哈希表的基本操作 306 ∷相关函数:SearchHash函数 (2009-03-12, C/C++, 108KB, 下载13次)

http://www.pudn.com/Download/item/id/671036.html

[数据结构] Trie

Trie树既可用于一般的字典搜索,也可用于索引查找。对于给定的一个字符串a1,a2,a3,...,an.则采用TRIE树搜索经过n次搜索即可完成一次查找。不过好像还是没有B树的搜索效率高,B树搜索算法复杂度为logt(n+1/2).当t趋向大,搜索效率变得高效。怪不得DB2的访问内存设置为虚拟内存的一个PAGE大小,而且帧切换频率降低,无需经常的PAGE切换。
Trie tree can be used for general dictionary english, can also be used to search the index. For a given a string a1, a2, a3 ,..., an. Is used TRIE tree english english after n times to complete a search. But they did not like B-tree search efficiency, B tree search algorithm complexity is logt (n+ 1/2). When t trend, and search efficiency becomes efficient. No wonder the DB2 access memory settings for the virtual memory size of a PAGE, and the frame switching frequency to reduce the need for frequent switching PAGE. (2008-05-25, C/C++, 1KB, 下载39次)

http://www.pudn.com/Download/item/id/472939.html

[数据结构] kmphebf

BF和KMP算法实例,曾经的作业,希望对你有点帮助
BF and KMP algorithm example, once the operation, and I hope to you a little help (2006-06-21, C/C++, 1KB, 下载10次)

http://www.pudn.com/Download/item/id/196475.html
总计:17