搜索资源列表
ClassicalDataStructures
- 常用的线性数据结构: 包括线性表、环形列表、队列、双端队列、单链表、双端链表、堆、栈、字符串数组等。非常有用,值得参考。-commonly used linear data structure : Table includes linear and circular table, queue, queue-end, single-linked list, double-linked list, heap, stack, as a string array. Very useful and val
LinkAndLink2
- 这是我刚刚学习C#时候编写的连连看小游戏,现在看来已经有点简单了.它的实现方式是控件数组,也就是声明了一堆Label.现在拿出来供后来者学习-just learning C# 1000 block of Terry Avenue when prepared by the small game, it now appears a bit simple. It is the way to achieve the control array is a heap of Label statement.
dwqdsort111
- 1)实现以下常用的内部排序算法并对它们的时间效率进行比较: 必做(6种):起泡排序、直接插入排序、简单选择排序、快速排序、希尔排序、堆排序; 选做:折半插入、二路归并、基数排序等等; 2)函数首部要求:void XXXXSort(char **list, int len, int n, int *c, int *s) 其中: a) XXXXSort为排序函数名,具体如下: 起泡排序BubbleSort 直接插入排序InsertSort 简单选择排序Sele
paixu
- 随机产生100个0到999的整数存放于分别用于快速排序和堆排序的2个整型数组和一个用于链式基数排序的静态链表之中。为整数序列的输出定义一个输出函数。依据快速、堆和基数排序三种不同的算法分别编写函数程序。-Randomly generated 100 0-999 integer stored in a separate stack for rapid sequencing and sequencing of two integer array and a base for the chain so
sort
- 设计一个Visual C++程序实现几种排序方法,要求输入一组数组之后,可以算出其几种排序的结果,即,依次为:直接插入排序,希尔排序,冒泡排序,快速排序,简单选择排序,堆排序,归并排序。 -To design a Visual C++ procedures for implementation of several sorting methods, for the importation of a group of the array, you can calculate the n
Onedimensionalarrclastemplate
- 建立一维数组数据结构的模板类,使一维数组中的数据元素可以是char, int, float等多种数据类型,类中的成员函数主要包括: 排序函数,能够对数组元素进行升序排列; 查找函数,能够在输入待查元素后,输出其在数组中的下标; 构造函数,初始化输入数组元素,这里要求数组元素的个数n是一个变量; 析构函数,释放数组元素所占用的堆内存; Set函数,可以为指定的数组元素赋值; Get函数,可以读取指定数组元素的值; Print函数,可以输出数组元素的值。 编写一个测试
heap_sort
- Sorting integer array using heap sort in c
huffmancode-0.1
- 构造霍夫曼树 ////////////////////// //根据权重生成霍夫曼树 //weight 权重数组 //n 权重数组长度 //NewTree 新生成的霍夫曼树 void createHFMTree(int* weights,int n,BinaryTree<int>& NewTree) { //初始化堆 MinHeap<BinaryTree<int> > heap(n) int i=0 f
SelectionSort
- 选择排序: 分为直接选择排序, 堆排序 直接选择排序:第i次选取 i到array.Length-1中间最小的值放在i位置。 堆排序:首先,数组里面用层次遍历的顺序放一棵完全二叉树。从最后一个非终端结点往前面调整,直到到达根结点,这个时候除根节点以外的所有非终端节点都已经满足堆得条件了,于是需要调整根节点使得整个树满足堆得条件,于是从根节点开始,沿着它的儿子们往下面走(最大堆沿着最大的儿子走,最小堆沿着最小的儿子走)。 主程序里面,首先从最后一个非终端节点开始调整到根
pro
- (1) 编写程序,给指针分配堆上的空间,打印指针指向的地址,与指针本身的地址进行比较; (2) 编写程序,对指向同一块空间地址的指针进行转换,并且提取指针的值进行打印,查看这些值之间的差异; (3) 编写程序,定义指针,并且指向栈上的空间,并与指向堆上的指针进行比较,分析栈上空间与堆上空间的分配差异; (4) 编写程序,定义指向数组的指针,与指向数组元素的指针进行比较; (5) 编写程序,实现用指针遍历数组; -(1) programming, the address of
test04
- 编写程序,给指针分配堆上的空间,打印指针指向的地址,与指针本身的地址进行比较; 编写程序,对指向同一块空间地址的指针进行转换,并且提取指针的值进行打印,查看这些值之间的差异; 编写程序,定义指针,并且指向栈上的空间,并与指向堆上的指针进行比较,分析栈上空间与堆上空间的分配差异; 编写程序,定义指向数组的指针,与指向数组元素的指针进行比较;-Programming, the address of the pointer to the allocated heap space, prin
5
- 假设有一个数据类型为整型的一维数组A,A 中的数据元素呈无序状态,编写一个采用堆排序法将A中的数据元素按由小到大进行排序的程序。-Suppose there is a data type integer one-dimensional array A, A data element was disordered state, the preparation of a heap sort using the data elements of A are sorted by ascending pr
minheap
- 基于Virtual C++的数据结构中堆的应用,能实现随机数组建立最小堆,遍历最小堆的结点,输出关键码,以及屏幕输入创建最小堆。-Application of data structure of Virtual stack based on C++, can realize the random array to establish the minimum heap, the minimum heap node traversal, the output and the input key, t
Second04
- 实验题目:产生随机数并进行排序。 实验要求: 1.随机产生30000个数存放到“random.txt”中; 2.从文件中读取30000个随机数存入数组,在此数组中排序; 3.将排好序(升序)的数组中的数存入以排序方式命名的txt文件中,如堆排序:Heapsort.txt。-Experiment title: generate a random number and sorting. The experimental requirements: 1. The num
新建 WinRAR 压缩文件
- 该程序是分别使用快速排序、插入排序、选择排序、冒泡排序、堆排序、归并排序、基数排序制作的,可以选择其一实现数组排序,通过主函数调用实现七种算法的演示。当输入一个数组的元素个数和数组元素之后可以选择七种排序方法之一进行排序并按从小到大的顺序输出。(The program is using fast sorting, insert sort, select sort, bubble sort, heap sort, merge sort, radix sort production, you can