-
[问题描述]
将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
-
约瑟夫环实现
约瑟夫环实现
- 2022-02-07 00:49:01下载
- 积分:1
-
本文以制作一个《论坛》为例,简单地介绍了delphi 2005 的B/S程序设计方法。数据库:SQL 2000,编程:delphi 2005 ARCHITECT...
本文以制作一个《论坛》为例,简单地介绍了delphi 2005 的B/S程序设计方法。数据库:SQL 2000,编程:delphi 2005 ARCHITECT-paper for the production of a "forum" for example, to brief the delphi 2005 B/S process design methods. Database : SQL 2000, programming : delphi 2005 ARCHITECT
- 2022-03-22 14:07:43下载
- 积分:1
-
数据库界面自动生成的控件
数据库界面自动生成的控件- The database contact surface automatic production controls
- 2023-05-28 18:55:02下载
- 积分:1
-
1、 字符串由随机产生的1~16位的字母组成,然后用插入排序、冒泡排序、堆排序、快速排序、归并排序对字符串进行排序。...
1、 字符串由随机产生的1~16位的字母组成,然后用插入排序、冒泡排序、堆排序、快速排序、归并排序对字符串进行排序。-1, the string randomly generated by the 1 ~ 16 of the letters, and then use Insertion Sort, Bubble Sort, Heap Sort, Quick sort, merge sort to sort on the string.
- 2022-03-07 11:41:28下载
- 积分:1
-
一个微型的数据库系统
一个微型的数据库系统--A mini database system
- 2022-05-14 00:09:01下载
- 积分:1
-
免费报告 2.33
免费FastReport®VCL是一个附加组件,它允许您的应用程序快速有效地产生报表。 FastReport®提供了所有必要的发展报告,其中包括一个可视化的报表设计器,报告的核心,和预览窗口的工具。它可以在Embarcadero的使用
- 2022-05-27 16:28:26下载
- 积分:1
-
Qt数据库操作
Qt对数据库操作,包括数据库打开与关闭,增加、删除、修改、查询,其中数据的展示是用自定义数据模型,是从QAbstractTableModel继承起的。
- 2022-03-03 10:17:11下载
- 积分:1
-
清华版的数据结构要求的实验 此为广义表的程序
清华版的数据结构要求的实验 此为广义表的程序-Qinghua version of the data structure required for this experimental procedure generalized Table
- 2022-01-22 10:55:41下载
- 积分:1
-
数据结构经典算法,c源码,很齐全的,对学习数据结构很有帮助。...
数据结构经典算法,c源码,很齐全的,对学习数据结构很有帮助。-c program,
- 2022-02-05 00:25:39下载
- 积分:1