-
[问题描述]
将N个关键字去整数的记录进行整序, 以使所有关键字为非负数的记录排在关键字为负数的记录之前,要求使用最少的附加空间,且算法的时间复杂度为O(N...
[问题描述]
将N个关键字去整数的记录进行整序, 以使所有关键字为非负数的记录排在关键字为负数的记录之前,要求使用最少的附加空间,且算法的时间复杂度为O(N)
[输入]
待排序记录个数,各关键字的值。
[输出]
关键字从正负分开,正数在前
[存储结构]
待排序记录顺序存储。
[算法的基本思想]
快速排序算法每次任取一个记录的关键字为标准,将其余记录分为两组将,N个关键字去整数的记录进行整序, 以使所有关键字为非负数的记录排在关键字为负数的记录之前。
#include
using namespace std
#define MAXNUM 100//设文件的最长可能长度
void sort(int* keys, const int len)//排序
-[Problem Description] N keyword to the integer sequence the entire record. keyword so that all non-negative Records with the keyword for the negative record, at least require the use of the additional space and time complexity of the algorithm is O (N) [imported] to be sort record number, The value of the keyword. [Output] keyword separate from the pluses and minuses are several former [storage structure] scheduling records to be stored sequence. [Algorithm for the basic idea] quick sort algorithm each time a record for any keyword as a standard, The remaining records will be divided into two groups, N-keyword
- 2022-03-17 21:15:57下载
- 积分:1
-
这是我的数据结构课程设计源代码,请务必按提示输入数据,该程序的功能是用链表实现多项式的四则运算。...
这是我的数据结构课程设计源代码,请务必按提示输入数据,该程序的功能是用链表实现多项式的四则运算。-This is my data structure course design source code, you must follow the directions to input data, the program"s function is used to achieve Chain of four polynomial operations.
- 2022-08-16 11:50:15下载
- 积分:1
-
一个很好的矩阵类,使用者用了请务必感谢原作者
一个很好的矩阵类,使用者用了请务必感谢原作者-a good matrix type, users spent Be sure to thank the original author! !
- 2023-02-20 22:25:03下载
- 积分:1
-
ODBC API访问数据库的文章却少之又少。虽然用ODBC访问数据库比较麻烦,但却很灵活,效率高,
ODBC API访问数据库的文章却少之又少。虽然用ODBC访问数据库比较麻烦,但却很灵活,效率高,-ODBC API to access the database of the article are few and far between. Although access to the database using ODBC is too much trouble, but it is very flexible, high efficiency,
- 2022-07-08 05:31:07下载
- 积分:1
-
MySQL是一个小型关系型数据库管理系统,开发者为瑞典MySQL AB公司。在2008年1月16号被Sun公司收购。目前MySQL被广泛地应用在Internet...
MySQL是一个小型关系型数据库管理系统,开发者为瑞典MySQL AB公司。在2008年1月16号被Sun公司收购。目前MySQL被广泛地应用在Internet上的中小型网站中。由于其体积小、速度快、总体拥有成本低,尤其是开放源码这一特点,许多中小型网站为了降低网站总体拥有成本而选择了MySQL作为网站数据库。MySQL的官方网站的网址是:www.mysql.com-MySQL is a small relational database management system, development of the Swedish company MySQL AB. In January 16, 2008 acquired by Sun. MySQL is currently being widely used in Internet, small and medium-sized site. Because of its small size, speed and low total cost of ownership, in particular the characteristics of open source, many small and medium-sized Web sites in order to reduce the total cost of ownership and choose the MySQL database as a Web site. MySQL
- 2022-08-19 01:59:46下载
- 积分:1
-
魔方阵完整算法(内含详细解释)
包括奇数和偶数
在VC6.0下运行...
魔方阵完整算法(内含详细解释)
包括奇数和偶数
在VC6.0下运行-Magic matrix integrity algorithm (containing detailed explanation), including odd and even run in VC6.0
- 2022-04-30 00:56:44下载
- 积分:1
-
CBASE_management
CBASE_management
- 2022-03-06 14:30:41下载
- 积分:1
-
数据结构的八皇后问题
数据结构的八皇后问题-data structure of eight Queens
- 2023-01-10 00:05:03下载
- 积分:1
-
汽车销售系统是一个典型的管理信息系统,它主要处理小型汽车销售公司的进销存的管理和控制等的问题。开发该系统包括数据库的建立与维护以及应用程序的建立。该系统主要包括...
汽车销售系统是一个典型的管理信息系统,它主要处理小型汽车销售公司的进销存的管理和控制等的问题。开发该系统包括数据库的建立与维护以及应用程序的建立。该系统主要包括:系统管理、基础档案(车型基本信息)、库存管理(车辆种类管理、车辆入库)、销售管理(车辆销售、月销售、日销售、季度销售、收益统计)、收款管理、库存管理(库存车辆、仓库明细、库存统计)和客户管理六个子系统模块组成。-thank you
- 2022-03-16 21:27:09下载
- 积分:1
-
java程序实现的通俗易懂的二分查找的算法源代码
java程序实现的通俗易懂的二分查找的算法源代码-java program to achieve the user-friendly dichotomous search algorithm source code
- 2022-02-04 20:18:19下载
- 积分:1