-
polynomial
本程序实现一元多项式合并。本程序输入方式为按项输入,每输入一个项,会先提示输入项的幂,再提示输入项的系数。(This procedure combined to achieve a dollar polynomial. This procedure according to entry input methods for the input, one for each input item, it will first prompt entry of the power, and then prompts entry of the coefficient.)
- 2009-12-16 17:29:54下载
- 积分:1
-
ExchangeTree
先序创建二叉树,将二叉树所有节点的左右子树交换,再先序遍历输出(create a binary tree in first order, exchange all the nodes of the binary subtree , then preorder output)
- 2014-07-08 21:30:13下载
- 积分:1
-
maopao_youhua
冒泡优化:
如果一个序列是int n[]={1,2,3,4,5,6,7,8,9} , 用正常的冒泡排序需要排8次才行,优化之后1次就好,也就是说序列越接近于正常序列,改进之后的冒泡排序的次数就越少,这样会给一个冒泡排序算法带了很大的效率。
思想:添加一个boolean变量用来判断冒泡是否是已经排好了顺序,如果boolean的值为false,说明是已经排好了,如果boolean的值true,说明没有排好,继续排。(If a sequence is int n [] = {, 1,2,3,4,5,6,7,8,9} need to row 8 times the job after optimization times like normal bubble sort, but alsomeans that the sequence is more close to the normal sequence, improved bubble sort, the less the number, which would give a bubble sort algorithm with a great deal of efficiency.
Idea: add a boolean variable used to determine the bubble whether it is already lined up the order, if the boolean is false, indicating already lined up, if the boolean value of true, did not line up, continue to row.)
- 2012-04-18 00:33:45下载
- 积分:1
-
text
输入N个点的坐标,判断这N个点能否构成一个凸多边形。(Enter the coordinates of N points, to determine whether the N points form a convex polygon.)
- 2011-12-13 09:43:42下载
- 积分:1
-
bfs
这是BFS算法的实现。用C语言实现的。好好学习吧。(This is achieved BFS algorithm. Implemented using C language. Learn it.)
- 2013-12-05 15:56:50下载
- 积分:1
-
point
用分治算法(O(nlogn)复杂度)实现寻找n个点中最邻近点对,输出为最邻近距离的平方(Looking for n points nearest point, the output of the nearest neighbor distance squared using the divide-and-conquer algorithm (O (nlogn) complexity))
- 2012-12-16 13:14:04下载
- 积分:1
-
sf_2014320164457
数据结构中的许多东西,包括头文件、例题、习题等等(Data structure many things, including the header files, examples, exercises, etc.)
- 2014-04-03 15:24:34下载
- 积分:1
-
04huffman_a
根据最常用的链表法进行huffman编码,可以手工预制权重,例如n=8的时候即可以在文件中写入,输出相应的编码结果(According to the most commonly used method of Chain Huffman coding, manual can be prefabricated weight, For example, n = 8 when it is written in the document, the output corresponding to the coding results)
- 2007-05-29 19:15:26下载
- 积分:1
-
c++
一款可以排序的小程序,希望大家可以看一下(A sort of small program, I hope you can look at it)
- 2017-12-13 20:06:55下载
- 积分:1
-
Kruskal
采用Kruskal算法求最小生成树主要数据结构
edgeset GE 存放图中的所有边
int n,int e 存放图中的顶点数与边数
edgeset C 存放生成树中的边
vexlist gv 图中结点的顶点值
adjmatrix s 用来处理图中结点的查找与合并
int m1,m2 一条边上两顶点所属集合的序号
int k 最小生成树中的边数
int d //图中待扫描边元素的下标(For the Minimum Spanning Tree by Kruskal main data structures edgeset GE store all edges in the figure int n, int e store graph vertices and edges edgeset C storage spanning tree edges in the vexlist gv graph node vertex values adjmatrix s used to process graph node to find and merge int m1, m2 an edge belongs to the set number two vertices int k minimum spanning tree edges int d // figure to be Scan edge element subscript)
- 2011-05-17 10:22:56下载
- 积分:1