-
[问题描述]
将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
-
专业、 学术或学习目的 123 TSQL 函数
这是用于专业、 学术或学习的 123 TSQL 函数的集合。有许多转换十六进制/八进制/二进制/罗马数字,如双曲型、 逻辑和三角函数的数学函数。组合、 排列 (因子)、 安排的组合功能。其他有趣的功能包括大量转化为简单易懂的英语、 莫尔斯代码、 EBCDIC 和反之亦然,莱文斯坦的距离 (语言学) 加密、 无限精度司和数字理论函数: 素数,不足、 完善、 丰富、 金色的数字。验证: 有效的电子邮件、 IP、 邮编和其他许多人。有一些有用的字符串函数来计数内另一个字符串的匹配项,找到一个从字符串末尾的字符串中的字符位置,包装、 再次换行,解开一个字符串,等等
- 2022-03-22 02:17:01下载
- 积分:1
-
ADBMS document for procedures and triggers
ADBMS document for procedures and triggers
- 2022-04-17 19:26:43下载
- 积分:1
-
学校信息系统
这项计划是包括招生过程中,搜索某一特定记录的学生和修改和更新的记录和该程序还提供了 2 份报告的学生。
- 2023-02-21 20:20:03下载
- 积分:1
-
轻量级数据库,动态DLL,不需要安装直接使用。
轻量级数据库,动态DLL,不需要安装直接使用。-small database, link DLL,and need not intall any program。
- 2022-07-15 07:22:54下载
- 积分:1
-
循环吗的C语言实现
循环吗的C语言实现-cycle? C Language
- 2023-06-04 21:45:03下载
- 积分:1
-
FORTRAN语言开发三
用Fortran开发三维球面delauney三角网剖分程序可用于曲面造型、最小生成树应用领域-Fortran development with three-dimensional spherical delauney Triangulation program can be used for surface modeling, minimum spanning tree applications
- 2023-02-01 03:15:03下载
- 积分:1
-
An ACCESS database on VC6.0 with the combination of examples of small programs
一个有关VC6.0与数据库为ACCESS结合的小程序例子-An ACCESS database on VC6.0 with the combination of examples of small programs
- 2022-03-16 14:15:06下载
- 积分:1
-
sql function of the knowledge
有关sql函数的知识-sql function of the knowledge
- 2022-04-07 08:28:39下载
- 积分:1
-
比较六种排序算法,其中包括快速排序,冒泡排序等内容的速度以及空间复杂度。...
比较六种排序算法,其中包括快速排序,冒泡排序等内容的速度以及空间复杂度。-Comparison of the six sorting algorithms, including quicksort, bubble sort etc. the speed and space complexity.
- 2022-04-01 09:09:42下载
- 积分:1