-
2.2
已知线性表中的元素以值递增有序排列,并以单链表作存储结构。试写一高效的算法,删除表中所有值大于mink且小于maxk的元素(若表中存在这样的元素)同时释放被删结点空间,并分析你的算法的时间复杂度(注意:mink和maxk是给定的两个参变量,它们的值可以和表中的元素相同,也可以不同)。(Known linear elements in the table to the value increments ordered, and a single list for the storage structure. Try to write a highly efficient algorithm to delete all values greater than mink and maxk elements smaller than (if there is such an element in the table) while the release of the deleted node space, and analyze your time complexity of the algorithm (Note: mink and maxk is given two parameters variables, their values and elements in the table can be the same or different).)
- 2015-04-11 23:11:41下载
- 积分:1
-
HuffmanTree
用c++实现的haffman tree 小程序,仅供参考 。 (The the haffman tree applet realized with c++ for reference only.)
- 2013-03-14 16:38:15下载
- 积分: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
-
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
-
shopping-question
实现超市中排队购物用时最短,是计算机算法设计与分析中的一道题。自己写的程序,原创!(Achieve queued supermarket shopping with the shortest, is a question in the design and analysis of computer algorithms. Write their own procedures, original!)
- 2012-08-18 11:01:09下载
- 积分:1
-
route-planning
遗传算法实现飞机在三维空间的航迹规划
C代码(Genetic Algorithm Route Planning
C code)
- 2012-04-20 09:23:18下载
- 积分:1
-
5100309203_5_8
二叉树类的前序,后序,层次遍历,其以链表方式存储(Binary tree class pre-order, post-order, hierarchy traversal, the linked list storage)
- 2012-12-16 14:16:41下载
- 积分:1
-
shiyan1
数据结构上机操作实验的实验1,线性表的基本操作!!!(the basic operation of sq of date structure)
- 2011-12-11 18:49:06下载
- 积分:1
-
005
c++ data struct stack
- 2012-03-01 14:24:42下载
- 积分:1
-
BiTree
二叉排序树的建立、插入与删除。按递增顺序插入N个整数,并按同样顺序删除;(Binary sort tree establishment, insertions and deletions. Insert N integers in ascending order, press the same sequence deleted )
- 2020-09-05 16:38:05下载
- 积分:1