-
[问题描述]
将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
-
简单的记账软件
用VC6 MFC开发的记账软件。记账数据保存在Access数据库,是新手入门的好素材。软件功能包括记账内容查询统计,账目记录、修改、删除等。
- 2022-02-03 12:40:19下载
- 积分:1
-
提醒的例子,大家可以去看看
提醒的例子,大家可以去看看 -Remind example, we can go and see
- 2022-07-05 09:16:47下载
- 积分:1
-
一个精彩的奥运会成绩统计系统,可以统计金牌榜,总分榜,包含精彩的VFP界面,即时迅速统计各个国家的金牌及奖牌总数的变化...
一个精彩的奥运会成绩统计系统,可以统计金牌榜,总分榜,包含精彩的VFP界面,即时迅速统计各个国家的金牌及奖牌总数的变化-one of the highlights of the Olympic Games scores system, the gold medal tally and statistics, scores charts, Highlights include the VFP interface, immediate rapidly statistics in various countries gold and total medals changes
- 2022-06-27 19:17:07下载
- 积分:1
-
密码:yfq
物流管理插件 物流管理系统-插件
密码:yfq
物流管理插件 物流管理系统-插件-Password: yfq logistics management Logistics Management System plug-ins- Plug-ins
- 2022-02-01 18:02:18下载
- 积分:1
-
小的 VB6 程序,接收来自 YHT3 称的重量。
VB6 的小程序,接收来自 YHT3 规模的重量,保存日期来访问数据库。
- 2023-01-17 18:00:04下载
- 积分:1
-
MySQL中文手册
Mysql的中文手册-Mysql Chinese Manual
- 2022-03-14 14:19:44下载
- 积分:1
-
a directory procedures, Access databases, ODBC
一个通讯录程序,Access 数据库,ODBC-a directory procedures, Access databases, ODBC
- 2022-02-21 07:43:10下载
- 积分:1
-
Data structure, Tsinghua University Press, courseware, edited by Yan Wei
数据结构,清华大学出版社,课件,严蔚敏编著-Data structure, Tsinghua University Press, courseware, edited by Yan Wei-min
- 2022-06-26 00:24:01下载
- 积分:1
-
求最大公约数的三种算法,程序中还对这三种算法进行了比较...
求最大公约数的三种算法,程序中还对这三种算法进行了比较-Common denominator for the three algorithms, the procedure is also the three algorithms are compared
- 2022-02-05 08:13:57下载
- 积分:1