搜索资源列表
ThreadBinaryTreeFindnextorFindprev
- 创建一棵二叉树,采用前序遍历的方法建立一棵树,传递的参数为一个指向结点的指针的指针,目的是为了解决传值的问题,输入@符号的时候,表示一棵子树结束线索化二叉树,寻找当前结点的后继结点,寻找当前结点的前驱结点,中序遍历 -create a binary tree using preorder before the establishment of a tree. transmission parameters of a point to the node pointer, the purpose
符号匹配问题
- 符号匹配问题编程-Symbol Matching Program
Joseh
- 约瑟夫问题的一个解法,主要利用数组来解决,代码为C++源代码。-Joseph A solution, the main use of the array to resolve the symbol C++ Source code.
dict
- 设∑={α1, α2…… αn }是n个互不相同的符号组成的符号集。 Lk={β1β2…βk | βiЄ ∑,1≤i≤k}是∑中字符组成的长度为k 的全体字符串。 S是Lk的子集,S是Lk的无分隔符字典是指对任意的S中元素a1a2…ak, b1b2…bk. {a2a3…akb1, a3a4…akb1b2, ……, akb1b2… bk-1 }∩S=Φ。该算法算法,对于给定的正整数n 和k,计算 Lk的最大无分隔符字典。 -Set Σ = [α1, α2 ... ...
huffman
- 一份huff_tc.c,只能在tc下运行,因为加入了用tc图形界面直观画出树形的代码。一份是huff_vc.c,是在vc和tc下都能运行的程序,没有直观表达编码的树形结构。 [目的] 构建所输入符号(及权值)的哈夫曼树,并利用该树求出各符号的编码,深入理解最优二叉树的概念及其特性。 [问题描述] 读入各个符号及其权值,求各符号的哈夫曼编码。 [基本要求] (1)读入各个符号及其权值,建立哈夫曼树; (2)利用建立的哈夫曼树对各符号进行编码,输出编码结果。 [
BinarySearchTree
- 从键盘上输 入一串正整数, 最后输入-1作为输入结束的标志。如输入的序列为:2,5,7,23,48,96,……,-1。请以这些正整数的值作为二叉排序树中的结点的数据场之值,建立一棵二叉排序树。注意:请采用动态存储方法保存这棵二叉排序树,事先并未知道该二叉排序树中的结点的个数。-Input from the keyboard on a string of positive integers, the last input-1 as an input symbol of the end. Such
huffman
- 包括huffman编码的源代码 输入为信源符号个数信源的概率分布 输出为每个符号对应的huffman编码的码字-Including the source code for huffman encoding source input for the number of source symbols of the probability distribution of output for each symbol corresponding to the codeword huffman c
LL1wenfapanding
- LL(1)文法使用的是确定的自顶向下的分析技术。LL(1)的含义是:第一个L表明自顶向下分析是从左向右扫描输入串,第2个L表明分析过程中将使用最左推导,1表明只需向右看一个符号便可决定如何推导,即选择哪个产生式(规则)进行推导。-LL (1) grammar is used to determine the top-down analysis techniques. LL (1) the meaning is: the first show that L is top-down analysis
bala
- 符号平衡问题:给定n 个整数n a , a , ,a 1 2 组成的序列,试设计一个O(n)时间算法,计算其最长符号 平衡段的长度。-Symbol balance: Given n integers na, a,, a 1 2 composed of a sequence and try to design an O (n) time algorithm to calculate the balance of the longest segment of t
he_fu_man_bian_ma
- 假设一个文件中出现了8种符号S0,SQ,S2,S3,S4,S5,S6,S7,那么每种符号要编码,至少需要3bit。假设编码成000,001, 010,011,100,101,110,111。那么符号序列S0S1S7S0S1S6S2S2S3S4S5S0S0S1编码后变成 000001111000001110010010011100101000000001,共用了42bit。我们发现S0,S1,S2这3个符号出现的频率比较大,其它符号出现的频率比较小,我们采用这样的编码方案:S0到S7的码辽分别01
3
- 实现二分法求解方程。编写并使用以下函数: double SolveRoot(double(*pf)(double x),double a,double b,int n) 这里,pf指向一个函数f,f用来定义要求解的方程f(x)=0,a和b是未知解x的上下界(即a<=x<=b), n是循环次数。例如,如果f(x)=x*x-2,则SolveRoot (f,1,2,100)将返回1.414213562373095, 即方程为x*x=2的解。二分法的原理是反复地把区间分为两个
pinghengerchashu
- 用二叉链表作存储结构 (1)以回车(‘\n’)为输入结束标志,输入数列L,分别生成一棵二叉排序树T和平衡的二叉排序树BT ; (2)对二叉排序树T作中序遍历,输出结果; (3)输入元素x,查找二叉排序树T:若存在含x的结点,则删除该 结点,并作中序遍历(执行操作2);否则输出相关信息; (4)分别计算T、BT的查找成功的平均查找长度,输出结果; -List for storage with the two fork structures (a) to carriage re
syntax
- LL(1)文法的实现。具体设计要求如下: 1. 可以使用任何语言来完成,例如:Java、C、C++。 2. 文法采用常用的方式进行描述,例如:S→aA。 3. 以文件方式读取文法。 4. 分别求出每一个非终结符FIRST 集FOLLOW集和SELECT集。 5. 画出预测分析表。 6. 判定读入的文法是否是LL(1)文法。 7. 给定的任意符号串判定是否是文法中的句子,将分析过程用计算机打印出来。 8. 查出文法中是否含有左递归或左公因子。若有则消除左公因子和左递
003
- 赫夫曼编码的程序,读入各个符号及其权值,建立哈夫曼树;利用建立的哈夫曼树对各符号进行编码,输出编码结果。 -Huffman coding of the program that reads the value of the various symbols and their right to build the Huffman tree used to establish the Huffman coding tree for each symbol, the output encodin
kl-zip
- (1)以回车(‘\n’)为输入结束标志,输入数列L,分别生成一棵二叉排序树T和平衡的二叉排序树BT ; (2)对二叉排序树T作中序遍历,输出结果;-(1) a carriage return (' \ n' ) for the input end of the symbol, enter the series L, respectively, generate a binary sort tree T and balanced binary sort tree BT (2) of
leddemo
- 了解符号表的作用、组织和数据结构,设计和实现一个符号表-Understanding of the role of the symbol table, organization and data structure, design and implement a symbol table
huffman
- 霍夫曼编码的码长是变化的,对于出现频率高的信息,编码的长度较短;而对于出现频率低的信息,编码长度较长。这样,处理全部信息的总码长一定小于实际信息的符号长度。-Huffman coding of the code length is variable, for the high frequency information, coding the length of the shorter and for the low frequency information, code length lon
stack
- 栈源码,链式栈的各种操作,栈的应用实例:包括符号匹配,数制转换,表达式求值-Stack source, the various operations chain stack, the stack of the application examples include: symbol matching, number system conversion, expression evaluation
Backtracking
- 这是算法设计与分析课程实验,回溯算法实验的简单的源代码,包括回溯法背包问题,回溯符号问题。-This is the algorithm design and analysis course experiment, the experiment simple backtracking algorithm source code, including backtracking knapsack problem, the problem back symbol.
Symbol-triangle
- 符号三角形问题,共同学习研究,有不足之处还请指出-Symbol triangle problem, common study, also requested the inadequacies pointed out