-
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
-
graph-DFS
邻接表存储图,然后进行深度优先遍历及广度优先遍历。(DFS,adjacent matrix)
- 2013-10-27 20:16:41下载
- 积分:1
-
data-structure-paper
本资料为数据结构的相关试卷,可以帮助大家解决一下有关考试的问题(This information is relevant papers data structure that can help you solve the problems concerning the examination)
- 2013-09-18 08:16:24下载
- 积分:1
-
Dynamic-Memory-Allocation
这个程序是有关计算机的动态内存分配的数据结构 可以直接加载头文件与源文件即可使用其中的接口(This program is a data structure for dynamic memory allocation of the computer can directly load the header files and source files you can use one of the interfaces)
- 2012-05-22 16:36:13下载
- 积分:1
-
main5
编写一个将二叉树的所有叶子结点从左向右链接成单链表的算法(Write a binary tree leaf nodes from left to right links into a single linked list algorithm)
- 2012-10-07 23:52:44下载
- 积分:1
-
data-structure-paper
本资料为数据结构的相关试卷,可以帮助大家解决一下有关考试的问题(This information is relevant papers data structure that can help you solve the problems concerning the examination)
- 2013-09-18 08:16:24下载
- 积分:1
-
0728-0708-0704
北邮数据结构课程设计大作业之旅行模拟查询系统。可实现多线程多旅客、中途更改计划、动态显示旅客状态等多个需求。已通过验收。(BUPT curriculum design travel query system simulation of large operations. Multithreading enables passengers to change plans midway, dynamic display multiple demands guest status. It has passed inspection.)
- 2021-03-14 12:09:23下载
- 积分:1
-
111
八皇后问题,用C语言实现,在VC++6.0环境中可以运行!92种答案(Eight queens problem)
- 2012-06-18 21:02:54下载
- 积分:1
-
carpub
一个简单的停车场管理程序,是初级学习数据结构时的一个十分重要的实验,了解这个对学习堆栈十分有用,基本题目是
设有一个可以停放[size=10.5pt]N[size=10.5pt]辆汽车的狭长的停车场,[size=10.5pt] [size=10.5pt]它们有一个大门可以供车辆进出。车辆按到达停车场时间的先后次序从停车场最里面向门口处停放(最先到达的第一辆车停在停车场的最里面)。如果停车场已放满[size=10.5pt]N[size=10.5pt]辆车,则后来的车辆只能在停车场大门外的便道上等待,一旦停车场内有车开走,则排在便道上的第一辆车就可进入停车场。停车场内如果有某辆车要开走,在它之后进入停车场的车辆都必须先退出停车场为它让路,待其开出停车场后,这些车辆再依原来的次序进入。每辆车在离开停车场时,根据它在停车场内停留时间的长短交费。如果停在便道上的车辆未进入停车场就要离去,允许其离去时不收停车费,并且仍然保持在便道上等待的车辆的次序()
- 2007-09-05 20:25:00下载
- 积分:1
-
migongproduce
迷宫生成器,可以根据需要自己建立各类型的迷宫,而且能求解出线路(Maze maze of various types of generators, according to the needs its own, but also to solve the lines)
- 2012-02-10 15:17:36下载
- 积分:1