-
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
-
BDX
设计、编写和调试面向对象C++程序,实现任意两个同类数据比大小
的通用函数(模板),涵盖普通数值型数据之间的比较、两个字符串之间的比较
(按字典序)、两个复数之间的比较(按模大小)等,并通过主函数加以调用和
测试。(Design, writing and debugging of object-oriented C++ procedures to achieve similar data than the size of any two generic functions (template), covering general comparison between numerical data, the comparison between the two strings (lexicographically), two Comparison between complex numbers (modulo the size), and through the main function to be invoked and tested.)
- 2020-11-28 13:49:29下载
- 积分:1
-
stringmatch
说明: 高速多字符串匹配程序,基于多字符串的KMP算法开发,能够实现多字符串的匹配(High-speed multi-string matching procedure, based on multi-string KMP algorithm development, to achieve multi-string match)
- 2009-07-22 10:36:52下载
- 积分:1
-
2007327
带权有向以及无向图的各种操作,适合数据结构初学者使用,是图那一章的重点(belt and the right to have no plans to the various operations, data structure suitable for beginners, is the chief focus of the chapter)
- 2007-04-22 23:49:54下载
- 积分:1
-
Test6
最短路径算法。
用无向带全图的邻接矩阵存储图,确定从源点出发到其它各点的最短路径。
输入:图中包含的顶点数n 边数m, 各边权值,用邻接矩阵或者邻接表存储。
输出:源点到其它各点的最短路径值。(Shortest path algorithm. Adjacency matrix storage with undirected graph with a full figure, determine the starting point of the shortest path from the source point of each other. Input: Vertices figure included n the number of edges m, the weight of each side, with the adjacency matrix or adjacency table storage. Output: source shortest path to value each other points.)
- 2014-05-11 17:05:37下载
- 积分:1
-
48qqqq
主要用栈和树求解骑士问题,用C++语言编写的(The main stack and tree Cavalier Problem Solving with C++ languages)
- 2009-03-21 22:34:39下载
- 积分:1
-
FIFO-c
说明: 操作系统先来先服务调度算法模拟(C描述)(Operating a first-come first-served scheduling simulation (C description))
- 2010-04-13 00:02:35下载
- 积分:1
-
LCS
the longest common serials
- 2011-12-13 00:32:40下载
- 积分:1
-
12
说明: 哈希表,用c++语言编写,可操作运行,结果正确(Hash table, using c++ language, operational run, the results are correct)
- 2011-05-06 14:42:14下载
- 积分:1
-
a
说明: 100米比赛排名 C++实现100米比赛排名 C++实现(100m rankings C++, the 100 meters ranks C++,)
- 2010-11-19 23:24:18下载
- 积分:1