资源列表
SFE
- 建立赫夫曼树,然后再由叶子到根实现赫夫曼编码。-Huffman tree set up, and then leaves to the root by the Huffman encoding implementation.
kruskal1
- kruskal算法求解最小生成树 K r u s k a l算法每次选择n- 1条边,所使用的贪婪准则是:从剩下的边中选择一条不会产生环路的具有最小耗费的边加入已选择的边的集合中。注意到所选取的边若产生环路则不可能形成一棵生成树。K r u s k a l算法分e 步,其中e 是网络中边的数目。按耗费递增的顺序来考虑这e 条边,每次考虑一条边。当考虑某条边时,若将其加入到已选边的集合中会出现环路,则将其抛弃,否则,将它选入。-kruskal
kuaipaiyuduipai
- 快速排序与堆排序是十分重要的数据结构算法,对于初学C++者来说掌握这两种算法十分重要-Quick sort and heap sort algorithm is very important data structure for the novice C++ are very important for the control of the two algorithms
zju2504dijkstra
- zoj2504利用dijikstra算法解决最短路问题。-zoj2504 use dijikstra algorithm to solve shortest path problem.
suanfa
- 用贪心算法解决单源点最短路径问题并打印出任意两点的具体路径(C语言实现)-With a greedy algorithm to solve single-source shortest path problem and print out the specific path between any two points (C language)
Dijkstra
- C++实现求单源最短路径,可以由用户自己构造有向无环图-C++, find single-source shortest path can be constructed by the users themselves have directed acyclic graph
bubble-sort
- 基于for循环的冒泡排序法,第一次上传还要这么麻烦,到二十个字了没-For loop based on bubble sort method, first upload should be so troublesome to twenty words yet
tree
- 构建树状数组,根据两点之间的路劲长度是否等于其编号差(mod n)来判断两点是否相通。-Construction of the tree array, according to the length between two points of the Road King is equal to its number difference (mod n) to determine whether two interlinked.
insertsort
- 插入排序算法1.for 循环找出一个待比较的值,然后进入while循环中,与数组中下标比它小的数据进行比较, * 因为下标比它小的数据都是排好序的,当a[i]大于这个数时,将a[i]往后移一下,就是这个数 * 的下标加1,依次循环,将比这个数的的数都移动到此数的后面,假如:当执行i--后,while条件 * 不成立,从而退出了while循环,此时,下标为i的数组值小于这个标准数,所以将这个标准数放到 * 下标为i+1的数组中。当for循环结束时,此数组中的所有元素都是有序的-In
maze
- 简单迷宫的搜索问题,其中#为路,*为墙,0为入口,1为出口,输入地图为矩阵-Simple maze search problem, where# is the way* for the wall, 0 is the entrance, one for export, enter the matrix map
MaxAndMin
- 递归分治思想实现S串中同时求出最大元和最小元。-with divid and conquer, to find out the max and min number in the string S.
poj1947Rebuilding-Roads
- poj1947Rebuilding Roads的AC代码,解法是树形DP-poj1947Rebuilding Roads AC code, the solution tree DP