-
[问题描述]
将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
-
线性表常用算法集合,含所有线性表基本的算法,与吴伟民编的数据结构书完全配套,用TC实现,经过运行。...
线性表常用算法集合,含所有线性表基本的算法,与吴伟民编的数据结构书完全配套,用TC实现,经过运行。-linear algorithm commonly used pool table, table containing all the basic linear algorithms, and Xiulan WU Weimin series of the data structure was fully complementary with TC realization, after running.
- 2022-01-20 22:51:35下载
- 积分:1
-
PHP中的宿舍管理软件
应用背景宿舍管理系统项目将能够为每个学生的房间号码,为每个学生的考勤信息。关键技术安装解压所有文件/文件夹。编辑connect.php并输入数据库信息。复制所有文件/文件夹到您的网站空间。运行create.php创建数据库称为“phptask”和创建的所有数据库表。重命名或删除文件create.php在成功安装。管理员用户的名字是“user123”,与“一”的口令。
- 2022-01-24 18:02:47下载
- 积分:1
-
最段路径算法C++实现 实现工程清晰可见 仅供参考
最段路径算法C++实现 实现工程清晰可见 仅供参考-Most paragraphs path algorithm C++ Realize realize the project clearly visible for reference only
- 2022-01-30 15:48:14下载
- 积分:1
-
一元多项式相加程序,用于完成一元多项式的相加
一元多项式相加程序,用于完成一元多项式的相加-One of the polynomial sum of procedures used to complete the sum of the polynomial 1
- 2022-01-26 05:40:56下载
- 积分:1
-
线性表的实现是数据中最基本、最简单的结构…
线性表的顺序逻辑结构的实现,线性表作为数据结构中的较为简单的结构,但对它实现的理解是进一步学习的关键.-the implementation of liner table is the most basic and simple structure in data stucture,but it is the best way to learn other data structures.
- 2022-03-11 09:54:08下载
- 积分:1
-
采用vb写的资料系统管理器功能特别
采用vb写的资料系统管理器功能特别-use of the information systems management function, particularly for
- 2022-06-17 06:15:57下载
- 积分:1
-
Data dictionary description of the database design a great help to
数据字典的说明,对数据库设计有极大的帮助-Data dictionary description of the database design a great help to
- 2022-12-03 21:15:03下载
- 积分:1
-
超市计价管理系统
超市计价管理信息系统开发,可用于超市计价,更新财务,存储管理等。介绍超市收费系统的运行环境、功能作用、设计的方案等各方面的内容。论文共分为五大部分。第一部分简要叙述了系统的基本概况。第二,三部分分别从软件工程的要求出发,首先进行问题的定义,其次进行可行性研究,分别从技术可行性,经济可行性和操作可行性进行分析,然后进行总体设计和详细设计,并阐述了如何实现具体功能。第四部分为系统调试,其中包括子模块测试和总体测试。
- 2022-05-26 06:49:18下载
- 积分:1
-
Mysql latest source code for Windows, vc6 vs.net can compile and upload to vomi...
Mysql for Windows最新源码,vc6vs.net均可编译,吐血上传。-Mysql latest source code for Windows, vc6 vs.net can compile and upload to vomit blood.
- 2022-03-24 00:36:15下载
- 积分:1