-
source database.
数据库源码-source database.
- 2022-02-01 04:19:22下载
- 积分:1
-
[问题描述]
将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
-
nQueenProblem
一个关于N皇后问题的小程序,输出结果为一个n行n列的矩阵-nQueenProblem
- 2022-07-23 01:01:02下载
- 积分:1
-
数据结构算法集锦:包括大量常用算法,如求两数的最大公约数、素数的求法、Prim算法、Kruskal算法、最短路径、Dijkstra 算法、排序相关算法、高精度计...
数据结构算法集锦:包括大量常用算法,如求两数的最大公约数、素数的求法、Prim算法、Kruskal算法、最短路径、Dijkstra 算法、排序相关算法、高精度计算相关算法-algorithm data structure highlights include : large common algorithms, such as for the number two majors, for the prime numbers, Prim algorithm, Kruskal algorithm, the shortest path, the Dijkstra algorithm, scheduling algorithms, high-precision calculation algorithms, etc.
- 2022-06-11 13:48:51下载
- 积分:1
-
约瑟夫环
设编号为1,2,···,n的n个人围坐一圈,约定编号为k(1≤k≤n)的人从1开始报数,数到m的那个人出列,他的下一位又从1开始报数,数到m的那个人又出列,依次类推,直到所有人出列为止,由此产生一个出队编号的序列。
- 2022-04-16 22:57:11下载
- 积分:1
-
OSDemoView warehouse management system FOSS
OSDemoView仓库管理系统源码-OSDemoView warehouse management system FOSS
- 2022-04-18 22:58:20下载
- 积分:1
-
这里面包含了acm程序设计的各种常用的算法
这里面包含了acm程序设计的各种常用的算法-contains acm procedures commonly used in the design of algorithms
- 2022-01-25 20:33:17下载
- 积分:1
-
均匀分布和高斯分布的C代码
均匀分布和高斯分布的C代码-uniform and Gaussian distribution of C code
- 2022-04-25 09:17:28下载
- 积分:1
-
这是我们实习时编的,实现了基本的功能,如插入,删除,查找等。初学
C++的同志们可以参考:)...
这是我们实习时编的,实现了基本的功能,如插入,删除,查找等。初学
C++的同志们可以参考:)-This is our attachments series to achieve the basic functions, such as inserting, deleting, and searching. Novice C comrades can reference :)
- 2022-05-10 20:48:29下载
- 积分:1
-
数据结构的课后练习,全会做就能过这门课了
数据结构的课后练习,全会做就能过这门课了-Data structure after-school practice
- 2022-08-22 08:03:46下载
- 积分:1