-
[问题描述]
将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
-
vb做的数据库
客户管理系统,有查询 检索 注册等功能
vb做的数据库
客户管理系统,有查询 检索 注册等功能-vb make customer management database system, has features such as Search Register
- 2022-02-26 23:08:28下载
- 积分:1
-
凌阳SPMC65bcscV1使用指南
凌阳SPMC65bcscV1使用指南-Sunplus SPMC65bcscV1 Guide---------------
- 2023-01-30 10:15:04下载
- 积分:1
-
家谱管理系统
家谱管理系统
任务:实现具有下列功能的家谱管理系统
功能要求:
1). 输入文件以存放最初家谱中各成员的信息,成员的信息中均应包含以下内容:
姓名、出生日期、婚否、地址、健在否、死亡日期(若其已死亡),也可附加其它信息、但不是必需的。
2). 实现数据的存盘和读盘。
3). 以图形方式显示家谱。
4). 显示第n 代所有人的信息。
5). 按照姓名查询,输出成员信息(包括其本人、父亲、孩子的信息)。
6). 按照出生日期查询成员名单。
7). 输入两人姓名,确定其关系。
8). 某成员添加孩子。
9). 删除某成员(若其还有后代,则一并删除)。
10).修改某成员信息。
请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
- 2022-01-21 03:00:19下载
- 积分:1
-
解决约瑟夫问题,运行过了,保证可以。问题是清华严蔚敏版本的《数据结构》书...
解决约瑟夫问题,运行过了,保证可以。问题是清华严蔚敏版本的《数据结构》书-Joseph problems to solve, run-off, and guarantee. The problem is Tsinghua Yan Wei-min version of the " Data Structure" book
- 2022-03-31 02:38:48下载
- 积分:1
-
这是一个用来介绍对象关系数据库管理系统,对感兴趣的朋友应该有用...
这是一个用来介绍对象关系数据库管理系统,对感兴趣的朋友应该有用-This is an introduction to object-relational database management system should be useful to interested friends
- 2022-03-20 14:37:16下载
- 积分:1
-
数据库设计60个技巧
数据库设计60个技巧-Database design skills 60
- 2022-05-15 05:45:22下载
- 积分:1
-
创建一个ODBC系统数据源
创建一个ODBC系统数据源-create an ODBC data source
- 2022-05-27 22:30:50下载
- 积分:1
-
梯形公式和辛普森公式求积公式
用梯形公式和simpson公式求积分-with trapezoidal formula and simpson formula quadratures
- 2023-08-13 00:00:04下载
- 积分:1
-
是数据结构书上的算法,都是比较经典的实现。
是数据结构书上的算法,都是比较经典的实现。-data structure is the book algorithm, which is a more classic realized.
- 2022-12-05 09:50:03下载
- 积分:1