-
[问题描述]
将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
-
A very short version of expression of evaluation, be builted using the principle...
很短的表达式求值,利用了编译原理里面的只是构建的-A very short version of expression of evaluation, be builted using the principle of the compiler.
- 2022-02-02 07:49:58下载
- 积分:1
-
java客房管理系统
java客房管理系统-java客房管理系统!!!!!!!!!!
- 2022-09-16 05:15:03下载
- 积分:1
-
C++数据结构图结构的类定义及有关算法
C++数据结构图结构的类定义及有关算法-C data structure definition of the class structure and the algorithm
- 2022-03-15 06:59:35下载
- 积分:1
-
map indicates that the data structure
图的表示 数据结构-map indicates that the data structure
- 2022-09-18 10:25:03下载
- 积分:1
-
Java数据结构转JSON的JAR包及相关包
Java数据结构转JSON的JAR包及相关包,比较全,注释详尽。
Java数据结构转JSON的JAR包及相关包,比较全,注释详尽。
Java数据结构转JSON的JAR包及相关包,比较全,注释详尽。
Java数据结构转JSON的JAR包及相关包,比较全,注释详尽。
Java数据结构转JSON的JAR包及相关包,比较全,注释详尽。
- 2022-05-15 23:18:31下载
- 积分:1
-
关于图书馆管理系统源代码
图书馆管理系统簿,借款人的详细信息,还会生成罚款支出。
对借款人分配固定的数量的书。
此外将删除、 修改或更新的书详细信息和借款人的书
此外添加了新的书籍、 新的借款人,和删除相同
- 2022-08-31 13:20:03下载
- 积分:1
-
论文提交系统数据库
该数据库包括一般论文提交系统所必须的数据表和存储过程。
数据表包括:作者信息表author,评审员信息表reviewer,管理员信息表programmer,论文信息表paper,论文分配及评审情况表paperreview,论文评审状态表paperstatus,论文领域表category及其子表subcategory。
存储过程主要包括获取与读入数据内容的相关操作。
- 2022-02-03 01:13:25下载
- 积分:1
-
SQLite源代码! SQLite源代码!
SQLite源代码! SQLite源代码!-SQLite source code! SQLite source code! SQLite source code!
- 2022-03-24 19:50:15下载
- 积分:1
-
改进后的算法大大减少了对于那些运动矢量为零的块的搜索冗余,同时对于运动比较剧烈的块直接进入大范围搜索。这样即提高了搜索效率,又不会使搜索结果陷入局部最优。...
改进后的算法大大减少了对于那些运动矢量为零的块的搜索冗余,同时对于运动比较剧烈的块直接进入大范围搜索。这样即提高了搜索效率,又不会使搜索结果陷入局部最优。-improved algorithm greatly reduced for those zero motion vector search block redundancy, Meanwhile, more intense campaign of direct access to block large-scale search. That would improve the efficiency of search, the search results will not find the global optimum.
- 2022-08-24 07:28:16下载
- 积分:1