CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - v c
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 - v c - 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-30
Size
: 2kb
User
:
水寒
[
Data structs
]
kcsj
DL : 0
校园导游图算法--数据结构中有关图的算法 按v求最短路径 按s求信息; 按q退出; 地图在map图像文件里-campus tour map algorithm-- data structure of the plan according to the algorithm for the shortest path v s by seeking information; Q withdrawal by; Maps map image file
Date
: 2025-12-30
Size
: 47kb
User
:
gjb
[
Data structs
]
SELECT2
DL : 0
通过精心挑选划分元素v,可以得到一个最坏情况时间复杂度为O(n)的选择算法。本次实习要求用c语言将此算法实现。要求实现此功能:输入一组数,返回A[i],使其为A(m:p)中第k小的元素,k是一个全局变量,取大于1的整数-division through carefully selected elements v, one can be the worst time complexity of O (n) algorithm. The internship requirement c language used this algorithm. Calls for this function : the importation of a number of groups, the return of A [i], so A (m : p) k small elements, k is a global variables, from an integer greater than
Date
: 2025-12-30
Size
: 8kb
User
:
[
Data structs
]
aaagchcv
DL : 0
源代码\用动态规划算法计算序列关系个数 用关系"<"和"="将3个数a,b,c依次序排列时,有13种不同的序列关系: a=b=c,a=b<c,a<b=v,a<b<c,a<c<b a=c<b,b<a=c,b<a<c,b<c<a,b=c<a c<a=b,c<a<b,c<b<a 若要将n个数依序列,设计一个动态规划算法,计算出有多少种不同的序列关系, 要求算法只占用O(n),只耗时O(n*n).-source \ use dynamic programming algorithm sequence relationship with the number "
Date
: 2025-12-30
Size
: 156kb
User
:
Sana
[
Data structs
]
TV.tar
DL : 0
TV-tree的c实现源码,对应原文章K.-I. Lin, H. V. Jagadish, C. Faloutsos: The TV-Tree: An Index Structure for High-Dimensional Data.-TV-tree c achieve the source, the original corresponding article K.-I. Lin, H. V. Jagadish, C. Faloutsos : The TV-Tree : An Index Structure for High-Dimensional Data.
Date
: 2025-12-30
Size
: 309kb
User
:
文
[
Data structs
]
suanfasheji
DL : 0
算法设计课程报告单源点最短路径问题,即,已知一个n结点有向图G=(V,E)和边的权函数c(e),求由某指定结点V0到其他各个结点的最短路径,这里还假定所有的权都是正的。-Algorithm design courses report a single source shortest path problem, that is known to a n-node directed graph G = (V, E) and the edge of the right to function c (e), for a specified node from V0 to the other node point of the shortest path, there is also assumed that all of the right are positive.
Date
: 2025-12-30
Size
: 16kb
User
:
dfghj
[
Data structs
]
tree
DL : 1
表达式类型的实现: 1、 一个表达式和一颗二叉树之间,存在着自然的对应关系。 2、 假设算术表达式Expression内可以含有变量(a~z)、常量(0~9)和二元运算符(+,-,*,/,^)。实现一下操作。 (1) ReadExpr(E)——以字符序列的形式输入语法正确的前缀表示式并构造表达式E。 (2) WritrExpr(E)——用带括弧的中缀表示式输出表达式E。 (3) Assign(V,c)——实现对变量V的赋值(V=c),变量的初值为0。 (4) Value(E)——对算术表达式E求值。 (5) CompoundExpr(P,E1,E2)——构造一个新的复合表达式(E1)P (E2)。 -Realize the type of expression: one, an expression, and between a binary tree, there is a natural correspondence between. 2, assuming that the arithmetic expression Expression can contain variables (a ~ z), constant (0 ~ 9) and binary operators ( ,-,*,/,^)。 You realize the operation. (1) ReadExpr (E)- sequence of characters in the form of input grammar correct prefix expressions and tectonic expression of E. (2) WritrExpr (E)- used within parentheses express output infix expression E. (3) Assign (V, c)- realize the value V of the variables (V = c), variable initial value is 0. (4) Value (E)- on the arithmetic expression E is evaluated. (5) CompoundExpr (P, E1, E2)- Construction of a new composite expression (E1) P (E2).
Date
: 2025-12-30
Size
: 57kb
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-30
Size
: 129kb
User
:
张娟
[
Data structs
]
Dijkstra
DL : 0
单源最短路径问题:给定带权有向图G=(V,E)。给定V中的一个顶点v,称为源。要计算从源到所有其它各顶点的最短路径长度。-Single-source shortest path problem: a given weighted directed graph G = (V, E). Given a vertex V in v, known as the source. To calculate from the source to all other vertices of the shortest path length.
Date
: 2025-12-30
Size
: 1kb
User
:
忠波
[
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-30
Size
: 538kb
User
:
赵刚
[
Data structs
]
DataStructureAlgorithm
DL : 0
数据结构和算法,非常经典,讲的很详细!第一部分 基础知识 第一章 C++程序设计 第二章 程序性能 第二部分 数据结构 第三章 数据描述 第四章 数组和矩阵 第五章 堆栈 第六章 队列 第七章 跳表和散列 第八章 二叉树和其他树 第九章 优先队列 第十章 竞赛树 第十一章 搜索树 第十二章 图 第三部分 算法设计方法 第十三章 贪婪算法 第十四章 分而治之算法 第十五章 动态规划 第十六章 回溯 第十七章 分支定界-Data structures and algorithms, very classic, talked in great detail! The first part of the basic knowledge of first chapter C++ Program Design Chapter II The second part of the data structure of program performance data described in Chapter III Chapter IV Chapter V array and matrix stack, queue, Chapter VI Chapter VII Chapter VIII of the jump table and the hash Binary trees and other tree priority queue IX Chapter X Chapter XI competition tree search tree diagram the third part of Chapter XII Chapter XIII greedy algorithm design method of divide and conquer algorithms Chapter XIV Chapter XV of the dynamic programming algorithm for 16th Chapter XVII Chapter backtracking branch and bound
Date
: 2025-12-30
Size
: 16.43mb
User
:
孙继磊
[
Data structs
]
0
DL : 0
算法,英文版,作者Dasgupta, C. H. Papadimitriou, and U. V. Vazirani-Algorithm, in English, author Dasgupta, CH Papadimitriou, and UV Vazirani
Date
: 2025-12-30
Size
: 1.6mb
User
:
小获
[
Data structs
]
1
DL : 0
最基础的数据结构顺序表,包含了输入。输出。插入以及删除功能 开发环境为V C -The order of the most basic data structure table containing the input. Output. Insert and delete function development environment for VC
Date
: 2025-12-30
Size
: 96kb
User
:
张泽
[
Data structs
]
part5
DL : 0
数据结构c++数据源代码,涵盖了基本的数据结构代码第五部分-Data structure c++ source code, covering the basic data structure code Part V
Date
: 2025-12-30
Size
: 10kb
User
:
溪溪
[
Data structs
]
Dijkstra
DL : 0
这个例程,会在多条相同最短路径中选出边数最少的路径.只是改变path域即可在遍历的时候访问到边数少的路径.核心的思想,就是建立一个数组,存放从出发点到当前顶点的最短路径边数.通过每次查看最短路径相同的情况, 即dv + cvw = dw.时,如果 Count[v] + 1 < Count[w]时,就执行 Count[w] = Count[v] + 1, 同时 w -> path = c.-This routine will be the same number of shortest paths in the selected path with the least number of edges. Just change the path traversal time domain can be accessed in the number of edges in the path less. The core idea is to create an array to store the starting point from The current number of edges in the shortest path vertices. by the shortest path each time you view the same situation, that is, dv+ cvw = dw., if Count [v]+ 1 < Count [w] when, on the implementation Count [w] = Count [ v]+ 1, while w-> path = c.
Date
: 2025-12-30
Size
: 1kb
User
:
php0
[
Data structs
]
KMP
DL : 0
通过c++实现KMP算法Knuth(D.E.Knuth)、Morris(J.H.Morris)和Pratt(V.R.Pratt)-KMP Algorithms
Date
: 2025-12-30
Size
: 230kb
User
:
杨轲
[
Data structs
]
01bag_problem
DL : 0
特殊的01背包(原算法分析题4-3) 问题描述:01背包是在N件物品取出若干件放在空间为C的背包里,每件物品的体积为W1,W2……Wn,与之相对应的价值为P1,P2……Pn,并取得最大价值。普通的01背包中物品的重量和价值没有明确的关系,这里定义一种特殊的01背包:向背包中放入的物品的价值和体积成反比,也就是价值越高,体积越小,注意这里物品价值和体积的乘积并不是固定值。例如:如下的物品满足这个“特殊的01背包”,5件物品: 物品1,价值 v=6,体积w=20 物品2,价值 v=1,体积w=60 物品3,价值 v=20,体积w=3 物品4,价值 v=15,体积w=15 物品5,价值 v=99,体积w=1 假如我有一个容量为c的背包,c=20,那么选择物品3、4、5可以获得最大价值134。 -01 bag problem
Date
: 2025-12-30
Size
: 656kb
User
:
毛骏
[
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-30
Size
: 4kb
User
:
lss
[
Data structs
]
package
DL : 0
有N件物品和一个容量为V的背包。第i件物品的重量是c[i],价值是w[i]。求解将哪些物品装入背包可使这些物品的重量总和不超过背包容量,且价值总和最大-There are N items and a capacity of V backpack. The weight of the i-th item is c [i], the value of w [i]. Which solution will allow these items into the backpack does not exceed the sum of the weight bag capacity, and the value of the sum of the maximum
Date
: 2025-12-30
Size
: 1kb
User
:
[
Data structs
]
v
DL : 0
使用C++里的strcat()函数,用来进行俩个字符串的连接-The use C++ strcat () function used to carry out the connection of two string
Date
: 2025-12-30
Size
: 210kb
User
:
程浩
«
1
2
»
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.