登录
首页 » Visual C++ » maopao_youhua

maopao_youhua

于 2012-04-18 发布 文件大小:1KB
0 171
下载积分: 1 下载次数: 2

代码说明:

  冒泡优化: 如果一个序列是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.)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论


0 个回复

  • 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
  • edge-betweenness
    计算边介数,复杂网络,中心性计算,介数也可以计算,运用了数据结构,计算大量数据(edge betweenness,complex network, centrality)
    2021-05-15 01:30:03下载
    积分:1
  • library
    纯C语言编程的模拟现有图书馆的借阅、续借、归还;图书入库、出库;查询、排序等功能,实现电子图书馆的智慧综合管理。其中查询功能里面嵌套精确查询,排序功能有六种,界面可变色,里面已经附带50多本图书信息包括图书摘要等详细信息。里面还附带详细设计报告和解说PPt。(Pure C language programming simulation existing library borrow, renew, return book storage, a library queries, sorting and other functions, to achieve integrated management of electronic library wisdom. Precisely where the query function inside a nested query, sort function has six, the interface can change color, which has included more than 50 books including books summary information and other details. Which also included detailed design reports and commentary PPt.)
    2020-10-30 14:59:57下载
    积分: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
  • mifeng
    c语言平时作业练习,包括输入输出,数组,链表等 c语言平时作业练习,包括输入输出,数组,链表等(output mifengoutput mifengoutput mifengoutput mifengoutput mifengoutput mifengoutput mifengoutput mifengoutput mifeng)
    2014-04-28 16:01:53下载
    积分:1
  • Data.Structures.For.Game.Programmers
    说明:  详细介绍了游戏设计的数据结构注意事项,对与游戏中角色和游戏模式作者给予了督导的见解,书中语言为全英文但通俗易懂!很是推荐 (Data.Structures.For.Game.Programmers Detailed data structure of the game design considerations, the role with the game and game modes of supervision given to insights, the book in English but the language is easy to understand! It is recommended)
    2010-04-14 11:21:09下载
    积分:1
  • liu
    一.问题描述 对2006年度全国80多个城市的每天空气质量状况进行查询、排序等操作。 空气质量状况对象包括城市代码、城市名称、首要污染物、污染指数、污染物级别、空气状况、年、月、日 二、实验要求 1. 普通查询:输入城市名称和城市代码,分别查询该城市每天、每周、每月、每季度和全年的空气质量状况 例子:查询太原市2006年第8周的空气质量状况 2.统计查询: (1)输入城市名称和城市代码,分别查询该城市每周、每月、每季度和全年的空气质量为优、良、轻微污染、轻度污染、重污染的天数 例子:查询石家庄市2006年第2季度空气质量为轻微污染的总天数 (2)根据时间查询空气质量状况:输入周编号、月编号、季度编号或年编号,以及空气质量为优、良、轻微污染、轻度污染、重污染的天数,查找相应的城市名称 例子:查询2006年5月,空气被轻度污染3天以上的城市有哪些? 3.排序查询 (1)输入周编号、月编号、季度编号或年编号,查询城市空气质量的排行榜 例子:查询2006年第6周,全国空气平均质量最好的前20个城市为哪些? 三、数据文件 Data.txt(one. Problem Description of the air quality day in 2006 more than 80 cities nationwide query, sorting and other operations. Air Quality objects include city code, city name, the primary pollutant, pollution index, contaminant level, air condition, year, month, day two, experimental requirements 1. General Queries: Enter a city name and city codes, each query in the city daily, weekly, monthly, quarterly example air quality and full year: Queries air quality in Taiyuan first eight weeks of 2006 2. Statistical inquiry: (1) enter a city name and city codes, each query in the city weekly, monthly, quarterly and annual air quality as excellent, good, slight pollution, light pollution, heavy pollution days example: inquiry Shijiazhuang City in 2006 second quarter, the air quality is the total number of days a slight pollution (2) according to time of the query air quality conditions: enter the week number, month number, quarter number or in number, and the air quality is excellent, good, sli)
    2017-04-07 10:58:37下载
    积分:1
  • 001
    二叉树的中序遍历,先序遍历以及后序遍历的算法(Binary tree in preorder traversal, preorder traversal and postorder traversal algorithm)
    2012-06-03 23:26:44下载
    积分:1
  • Ex1
    从屏幕输入字符 判断括号匹配问题 数据结构作业(Judgment parenthesis matching data structure operations input characters from the screen)
    2012-11-27 15:17:10下载
    积分:1
  • Graph
    数据结构中图的遍历Data structure traversal of center(Data structure traversal of center)
    2013-11-28 10:53:29下载
    积分:1
  • 696518资源总数
  • 105549会员总数
  • 12今日下载