搜索资源列表
hash
- /* * The internal form of a hash table. * * The table is an array indexed by the hash of the key collisions * are resolved by hanging a linked list of hash entries off each * element of the array. Although this is a really simple desig
稀疏矩阵运算器
- 题目:稀疏矩阵是指那些多数元素为0的矩阵.利用稀疏特点进行存储和计算可以大大节省存储空间,提高计算效率.实现一个能进行稀疏矩阵基本运算的运算器.基本要求:以带行逻辑连接信息的3元组顺序表表示稀疏矩阵,实现两个矩阵相加,相减和相乘的运算.矩阵的输入形式采用3元组表示,而运算结果的矩阵则以通常的阵列形式列出.概要设计:1.以带行逻辑连接信息的3元组顺序表表示稀疏矩阵2.本程序包含2个模块:(1) 各集合定义模块(2) 主程序模块-topics : sparse matrix refers to th
IntegerSort
- 设计一个由自动测试排序算法性能(比较次数compare_count、交换次数exchange_count、探测次数probe_count)的测试类和排序类构成的类体系。 注:用一个类来描述一个排序算法,类中的sort方法通过调用比较、交换方法来实现数组排序。排序类放入一个特定的包MySort中。-Design a sorting algorithm by automatic test performance (compare the number of compare_count, the
youchongfuyuansupailiewenti
- 算法设计与分析的一道题目:有重复元素排列问题(适用于上课实验)-Algorithm design and analysis of a topic: There are repeating elements in array problems (for school test)
checkarray
- 设计一个用于检查数组在使用时下标是否越界的类,如越界给出提示。(知识点:下标运算符的重载)。-Used to check the design of a current array subscr ipt is in the use of cross-border class, such as cross-border give tips. [Knowledge points: subscr ipt operator overloading].
Structure
- 数据结构是计算机学科的一门核心课程。数据结构课程的 任务是讨论现实世界中数据的各种逻辑结构、在计算机中的存 储结构以及实现各种操作的算法等问题。掌握如何组织数据、 如何存储数据和如何处理数据的基本方法,从而更好地进行软 件开发和应用。 典型数据结构包括表、堆栈、队列、数组、串、树、二叉 树、图、递归程序设计、排序和查找方法,介绍的典型存储结 构包括顺序存储结构、链式存储结构以及这两种典型存储结构 的结合。本速查器采用C语言作为算法描述语言,所有算法和 设计
maandian
- 找马鞍点:1. 若在矩阵Am×n中存在一个元素A[i][j],其满足A[i][j]是第i行元素中最小值,且又是第j列元素中最大值,则称此元素为该矩阵的一个马鞍点。用二维数组存储矩阵Am×n ,设计算法求出矩阵中所有马鞍点。-Find a saddle point: 1. If in the matrix Am × n, there is a element of A [i] [j], the meet A [i] [j] is the first line element in the mini
maze
- 迷宫 数据结构上机课程设计——源代码 使用二维数组-Maze data structure courses on machine design- the source code using two-dimensional array
minghua
- 世界名画陈列室由m*n个排列成矩形阵列的陈列室组成。为了防止名画被盗,需要在陈列室中设置警卫机器人哨位。每个警卫机器人除了监视它所在的陈列室外,还可以监视与它所在的陈列室相邻的上、下、左、右4个陈列室。试设计一个安排警卫机器人哨位的算法,使得名画陈列馆中每一个陈列室都在警卫机器人的监视下,且所有的警卫机器人数最少。-Gallery by the world famous painting of m* n rectangular array arranged in the composition
DataStructureAlgorithm
- 数据结构和算法,非常经典,讲的很详细!第一部分 基础知识 第一章 C++程序设计 第二章 程序性能 第二部分 数据结构 第三章 数据描述 第四章 数组和矩阵 第五章 堆栈 第六章 队列 第七章 跳表和散列 第八章 二叉树和其他树 第九章 优先队列 第十章 竞赛树 第十一章 搜索树 第十二章 图 第三部分 算法设计方法 第十三章 贪婪算法 第十四章 分而治之算法 第十五章 动态规划 第十六章 回
test1
- 女问题描述: 设R={r1,r2,...rn}要进行排列的n个元素。其巾元素r1,r2...rn可能相同。试设计 一个算法,列出R的所有不同排列。 编程任务: 给定n以及待排列的n个元素。计算出这n个元索的所有不同排列。-Female Problem Descr iption: Let R = (r1, r2, ... rn) must be arranged in n elements. The towel elements r1, r2 ... rn may be the s
paixu
- 编写程序,对一个整数数组使用某种排序方法(自选)进行降序排列,输出排序前后的数组内容 设计一个复数类,包含必要的属性、构造方法和成员方法,在程序中调用这些方法并输出运算结果。-The preparation of procedures, an array of integers using a sort method (optional) in descending order, the output sorted array of pre-and post content design of
tree
- 设T是一棵具有n个结点的二叉树,若给定其先序和中序遍历序列,并假定其其先序和中序遍历序列分别存放于数组PreOder[n-1]和InOrder[n-1]中,试设计构造该二叉树链式存储结构的递归算法。-T is a set with n nodes of binary tree, if a given sequence and the sequence of its first traversal sequences, and assumed its first order and the ord
data_struct6
- 数据结构课后设计题第六章 6.33③ 假定用两个一维数组L[1..n]和R[1..n]作为 有n个结点的二叉树的存储结构, L[i]和R[i]分别指 示结点i的左孩子和右孩子,0表示空。试写一个算法 判别结点u是否为结点v的子孙。-Data structure design question after class VI 6.33 ③ assumed with two one-dimensional array L [1 .. n] and R [1 .. n] as an
main-element
- 具体地讲,如果一个数组A[1..n]中超过半数的元素都相同时,该数组被称为含有一个主元素。 (a) 设计一个有效算法(至少是O(n logn)),确定该数组中是否含有一个主元素,如果有,找出这个元素。 (为简单起见,假设n是2的幂,且n<150) (b) 能否给出一个线性时间算法? 需注意的是,该数组的元素之间可能不存在顺序——即不能进行”A[i]<A[j]”的判断,但是可以进行是否相等的判断。 -Specifically, if an array A [1 ..
SJJGPXBJ
- 数据结构的课程设计。10种内部排序算法的比较,有三种比较方式,随机数组比较,已排序数组升序比较,已排序数组逆序比较,只直观的给出了比较次数等,-Data structure course design. 10 kinds of internal sorting algorithms comparison, there are three more ways, more random array, the array has been sorted in ascending order of co
lesscoins
- 设有n 种不同面值的硬币,各硬币的面值存于数组T〔1:n 〕中。现要用这些面值的硬币来找钱。可以使用的各种面值的硬币个数存于数组Coins〔1:n 〕中。 对任意钱数0≤m≤20001,设计一个用最少硬币找钱m 的方法。-With n different coins, the face value of the coins stored in the array of T 〔1: n〕 in. Now use these coins to find the money. You can us
4
- (1)已知一棵完全二叉树存放于一个一维数组T[n]中,T[n]中存放的是各结点的值。试设计一个算法,从T[0]开始顺序读出各结点的值,建立该二叉树的二叉链表表示。 (2)二叉树的双序遍历(Double-order traversal)是指:对于二叉树的每一个结点来说,先访问这个结点,再按双序遍历它的左子树,然后再一次访问这个结点,接下来按双序遍历它的右子树。试写出执行这种双序遍历的算法。 -(1) known to a complete binary tree stored in a o
zuoye
- 汉诺塔 算法:将上面的n-1个盘子从A移动到C,B作为辅助; 将最下面的盘子n从A移动到B, 将n-1个盘子从C移动到B,A作为辅助 1. 对一个整形数组设计一个排序算法 .n个元素的实数数组,写出求其最大元素和最小元素的算法-Tower of Hanoi algorithm: the above n-1 a plate moves from A to C, B as an auxiliary n the bottom of the plate moves from A t
Design.high.level.VC.sorting.array
- VC 编程阵列排序设计 Design of high-level programming VC sorting array code -Design of high-level programming VC sorting array code