-
[问题描述]
将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
-
航空票务预订系统
航空票务预订系统-Air Ticket Booking System
- 2022-03-23 12:12:29下载
- 积分:1
-
名片夹软件,用户可以建立并管理自己的名片。数据库配置为_app目录下的config目录中的database文件...
名片夹软件,用户可以建立并管理自己的名片。数据库配置为_app目录下的config目录中的database文件-name card management software.
- 2022-03-18 05:14:23下载
- 积分:1
-
(一) 编写一个程序LAGO7
(一) 编写一个程序LAGO7-1.CPP,实现二叉树的各种运算,并在此基础上设计一个主程序完成如下功能。
(1) 输出二叉树B;
(2) 输出二叉树B的深度;
(3) 输出H结点的左、右孩子结点值;
(4) 输出二叉树B的宽度;
(5) 输出二叉树B的结点个数;
输出二叉树B的叶子结点个数
-(A) to prepare a program LAGO7-1.CPP, to achieve a variety of binary operations, and on this basis, design a main program performs the following functions.
(1) output binary tree B
(2) The output of a binary tree B of depth
(3) The output of H nodes left and right child node value
(4) outputs a binary tree B, width
(5) output node B, the number of binary trees
(6) outputs a binary tree B, the number of leaf nodes
- 2023-02-06 07:20:04下载
- 积分:1
-
先进的高校管理系统
它是用户的先进的大学作为背 end.5 不同类型编写 C#.Net 4.5 作为前端和 SQL Server 2012 中的管理系统项目1.管理-一切2.讲师 (考勤及内部标记的条目只)3.账目专员 (仅限交易记录)4.招生主任 (学生注册,配置文件条目只)5.学生 (查看出勤、 内部标记、 费用详细信息、 事件和主体信息)6.数据库备份和还原的选项主要特点是: slipStudent StudentsProfile EntryHostelers EntryRegistration/AdmissionAttendanceInternal 标记 EntryEmployee 配置文件 EntryTransactionSalary PaymentCourse 费 PaymentBus 费 PaymentScholarship PaymentHostel 费 PaymentOthers TransactionTransportation ManagementEvents ManagementCourse 费付款 ReceiptScholarship 付款 ReceiptHostel 费付款 ReceiptBus 费付款 ReceiptSalary 报告 CardUsersRegistrationChange PasswordPassword RecoveryAdvance 记录 SearchingAdvance ReportsLogin 信息: 用户类型-访问权限名称-adminPassword-12345
- 2022-05-13 13:22:51下载
- 积分:1
-
一个小的闹钟程序
一个小的闹钟程序-a small alarm clock procedures
- 2022-07-15 20:15:28下载
- 积分:1
-
清华大学数据结构讲义
清华大学数据结构讲义-data structure lectures Tsinghua University
- 2022-12-08 13:40:03下载
- 积分:1
-
《数据结构》配书光盘
内容包括:线性表,栈和队列,串,数组与广义表,树,图,查找,排序等所以算法。
该光盘中配有《数据结构》一书中的所有算法、每一个算法...
《数据结构》配书光盘
内容包括:线性表,栈和队列,串,数组与广义表,树,图,查找,排序等所以算法。
该光盘中配有《数据结构》一书中的所有算法、每一个算法的 C 程序(后缀为 .cpp 的文件)及可执行文件(后缀为 .exe 的文件)。-"data structure" assigned CD include : linear table, stack and queue, strings, arrays and broad scale tree, map, search, sort, etc. So algorithm. The CD-ROM equipped with a "data structure," a book of all the algorithm, the algorithm for each one C (suffix. Cpp files) and the executable file (wayward. Exe files).
- 2022-05-14 19:58:49下载
- 积分:1
-
本程序实现调用开放式数据库连接 (ODBC) 函数,及调用 ODBC 函数 SQLTables 和 SQLColumns。
显示选定数据库中的所有表,以及...
本程序实现调用开放式数据库连接 (ODBC) 函数,及调用 ODBC 函数 SQLTables 和 SQLColumns。
显示选定数据库中的所有表,以及为每一个表显示列的列表和有关每一列的信息.-the program called Open Database Connectivity (ODBC) functions, and ODBC function calls and SQLColumns SQLTables. Shows selected database of all the tables, and each table shows a list of columns and each of the information.
- 2022-12-05 19:35:03下载
- 积分:1
-
6个经典数据结构JAVA解法,供学习。
6个经典数据结构JAVA解法,供学习。-six classic data structures Java Solution for learning.
- 2023-03-06 08:35:03下载
- 积分:1