-
北大ACM1005(I Think I Need a Houseboat)
北大ACM1005(I Think I Need a Houseboat)-North ACM1005 (I Think I Need a Houseboat)
- 2022-10-05 06:00:03下载
- 积分: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
-
遍历是二叉树经常要遇到的一种操作.可以运用到二叉树结点计数,线索化二叉树,求二叉树的深度,表达式求值等算法中.在遍历的过程中,对结点的访问具有普遍的含义,可以是...
遍历是二叉树经常要遇到的一种操作.可以运用到二叉树结点计数,线索化二叉树,求二叉树的深度,表达式求值等算法中.在遍历的过程中,对结点的访问具有普遍的含义,可以是输出各结点的数据域信息,也可以是对结点作其他处理.另外,通过一次完整的遍历,可使二叉树中结点信息由非线性排列变为某种意义上的线性排列.也就是说,遍历操作使非线性结构线性化.
-traverse binary tree is frequently encountered in a operation. Binary Tree can be applied to node count, clues of a binary tree, the binary tree for depth, in the expression evaluates such algorithm. the ergodic process, right node of the visit is universal meaning, it can be output in each node of data domain information, also be on the node for other treatment. Besides, a complete traversal, Binary enables information from the node into a nonlinear with a sense of linear order. In other words, Traversing operation nonlinear structure so linear.
- 2022-02-27 00:08:38下载
- 积分:1
-
N皇后问题的解决方案,利用回归的方法.方法易懂
N皇后问题的解决方案,利用回归的方法.方法易懂-N Queens solution to the problem, using regression. Methods to understand
- 2022-07-22 20:59:12下载
- 积分:1
-
数据结构c语言版,图的遍历,周游世界,无向图的遍历,包含14个国家。...
数据结构c语言版,图的遍历,周游世界,无向图的遍历,包含14个国家。-Data structure c language version, graph traversal, travel around the world, undirected graph traversal, including 14 countries.
- 2022-08-18 21:58:53下载
- 积分:1
-
数据库租赁 DVD
这是我的功课,与我的朋友。此示例数据库从 dvd 出租店。有 6 个实体,有一个关系 N N,N-1,执行查询,子查询,函数、 包,过程中,光标和触发器。
- 2023-07-12 15:30:09下载
- 积分:1
-
used to demonstrate each Treeview Field
用Treeview来显示每个Field-used to demonstrate each Treeview Field
- 2022-09-04 00:10:03下载
- 积分:1
-
最段路径算法C++实现 实现工程清晰可见 仅供参考
最段路径算法C++实现 实现工程清晰可见 仅供参考-Most paragraphs path algorithm C++ Realize realize the project clearly visible for reference only
- 2022-01-30 15:48:14下载
- 积分:1
-
这是一套医院使用的订购药品的进存销系统,功能强大,使用方便...
这是一套医院使用的订购药品的进存销系统,功能强大,使用方便-This is a set of ordering the use of hospital drugs into Cun-pin system, a powerful and easy to use
- 2023-04-27 04:55:03下载
- 积分:1
-
对数据库的总分字段进行排序,填充到名次字段中去.
对数据库的总分字段进行排序,填充到名次字段中去.-Total field of the database to sort, filled to the field to finish.
- 2022-07-15 17:50:58下载
- 积分:1