-
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
-
Dijkstra
主要是DIJKSTRA经典算法,可以作为单个算法来读,也可以调用。(DIJKSTRA mainly classical algorithm can be read as a single algorithm can also be called.)
- 2010-09-25 17:37:40下载
- 积分:1
-
Library
数据结构课程设计 数据结构B+树
B+ tree Library(B+ tree Library)
- 2009-05-18 14:07:25下载
- 积分:1
-
0829-Binary-Tree
二叉搜索树的生成和查找节点,北大《数据结构与算法》教材的习题(The generation and find nodes of a binary search tree, Peking University, " Data Structures and Algorithms" textbook exercises)
- 2012-11-28 14:51:01下载
- 积分:1
-
JOSEPHUS
一个关于约瑟夫环问题的经典算法编程的C语言实现(the program about JOSEPHUS)
- 2011-08-13 10:09:20下载
- 积分:1
-
12
说明: c编写的链表连接函数,上课时学的,上传试试 (c write the list to connect function, class, learn, try uploading)
- 2010-07-08 15:27:22下载
- 积分:1
-
b-trees
① 实现在B-树上的查找,并分析其时间复杂性。
② 实现B-树的ADT,包括其上的基本操作:结点的加入和删除。
③ 要求B-树结构中的M=3 或5,实现其中的一种即可。
④ 实现基本操作的演示。
(4) 实现提示
(b-trees c/c++)
- 2021-01-20 09:48:41下载
- 积分:1
-
floy
floyd算法
数据结构
求最短路径(floyd algorithm for data structure for shortest path)
- 2007-11-13 23:39:25下载
- 积分:1
-
Eight-Digital
说明: 八数码 对任意数字序列重新排序 高级散列函数 MFC基础编程(Eight Digital
Reorder the sequence of any number
Senior hash function
MFC based programming)
- 2011-04-11 16:31:59下载
- 积分:1
-
FreeTree
无环连通图G=(V, E)亦称为自由树T,其直径是树中所有顶点之间最短路径的最大值,设计一个算法求T的直径(Acyclic connected graph G = (V, E) is also known as free tree T, whose diameter is the tree of shortest paths between all vertices maximum design an algorithm for the diameter of T)
- 2013-10-29 16:31:47下载
- 积分:1