Location:
Search - quicksort
Search list
Description: quick sort例子
Platform: |
Size: 1204 |
Author: |
Hits:
Description: 比较InsertionSort,Shellsort,Quicksort快慢-comparison InsertionSort, Shellsort, Quicksort speed
Platform: |
Size: 488814 |
Author: 潘超 |
Hits:
Description: 排序算法、字典和B-树的C++语言实现
代码内容 包括以下算法:
qui.c sort: quicksort
qsort.c sort: qsort
ins.c sort: insert sort
shl.c sort: shell sort
has.c dictionary: hash tables
bin.c dictionary: binary tree
rbt.c dictionary: red-black trees
skl.c dictionary: skip lists
ext.c external sort
btr.c btree
语言 C++
编译平台 Visual C++
作者 Thomas Niemann
备注 来自Sorting and Searching Algorithms:A Cookbook-algorithm, dictionaries and B-Tree C language code include the following algorithm : qui.c sort : quicksort qsort.c sort : qsort ins.c sort : insert sort shl.c sort : shell sort has.c dictionary : hash tables bin.c dictionary : binary tree rbt.c dictionary : red-black trees skl.c dictionary : skip lists ext.c external sort btr.c BTREE Part C language Visual C platform translated author Thomas Niemann Remarks from the Sorting and S earching Algorithms : A Cookbook
Platform: |
Size: 24943 |
Author: 罗鹏魁 |
Hits:
Description: 一个关于headsort 和 quicksort 比较的程序,从这个例子可以看出在各个不同的情况下,headsort 和 quicksort 做了多少次比较. -headsort on a comparison of quicksort and procedures from this example can be seen in various circumstances, and quicksort headsort done a number of times earlier.
Platform: |
Size: 10972 |
Author: 魏昕 |
Hits:
Description: oid Reset() //重置\"次数\", 即比较与移动的效率统计
int BubbleSort(int length, int ls[]) //冒泡排序
int InsertSort(int length, int ls[]) //插入排序
int SelectSort(int length, int ls[]) //选择排序
int QuickSort(int length, int ls[]) //快速排序
int ShellSort(int length, int ls[]) //希尔排序
-oid Reset () / / replace "frequency", that compared with the efficiency of mobile statistics int BubbleSort (int length, int ls []) / / int Bubble Sort InsertSort (int length, int ls []) / / Sort int SelectSort insert (int length, int ls []) / / int QuickSort SELECTION SORT (int length, int ls []) / / int Quick Sort ShellSort (int length, int ls []) / / Sort Hi
Platform: |
Size: 1122 |
Author: Hy |
Hits:
Description: ----
Huffman 算法的不同实现
本目录下的程序用8种不同的方式实现了Huffman编码算法,这8种方式分别是
* huffman_a 使用链表结构生成Huffman树的算法,这是最基本的实现方法,效率最低。
* huffman_b 使用《数据结构》(严蔚敏,吴伟民,1997,C语言版)中给出的算法,将二叉树存放在连续空间里(静态链表),空间的每个结点内仍有左子树、右子树、双亲等指针。
* huffman_c 使用Canonical Huffman编码,同时对huffman_b的存储结构进行改造,将二叉树存放在连续空间tree里,空间的每个结点类型都和结点权值的数据类型相同,空间大小为2*num,tree[0]未用,tree[1..num]是每个元素的权值,生成Huffman后,tree[1..2*num-1]中是双亲结点索引。
* huffman_d 在huffman_c的基础上,增加预先排序的功能先用QuickSort算法对所有元素的权值从小到大排序,这样,排序后最前面的两个元素就是最小的一对元素了。我们可以直接将它们挑出来,组合成一个子树。然后再子树的权值用折半插入法插到已排序的元素表中, 保证所有结点有序。为了保证初始元素的顺序不变,我们另外使用了一个索引数组,所有排序中的交换操作都是在索引数组中进行的----- Huffman algorithm to achieve Catalog under different procedures used eight different ways to achieve a Huffman coding algorithm, eight models were used huffman_a * Chain Structure Generation Huffman tree algorithm, This is the most basic method, the minimum efficiency. * Huffman_b use of "data structure" (Yan Wei Min, Xiulan WU Weimin, 1997, C language version) is the algorithm stored in a binary tree will be continuous space (static List), the space within each node still left subtree, right subtrees, parents and other indicators. * Canonical huffman_c use Huffman coding, while huffman_b storage structure transformation, will be stored in a binary tree continuous space tree, space each node type and the right node value of the same data type, size space for two * num, tree
Platform: |
Size: 32702 |
Author: ray |
Hits:
Description: 快速排序算法。生成10个随机数,显示在编辑框中,调用快速排序函数,对前10 个编辑框中的数字进行排序。-quicksort algorithm. Generate 10 random numbers show that, in the edit box, called Quick Sort function, right before the 10 box editing the figures for the ranking.
Platform: |
Size: 141116 |
Author: song |
Hits:
Description: 分别用快速排序和分治算法对随机产生的200个数进行排序-respectively quicksort algorithm and the partition of the 200 randomly generated number Sort
Platform: |
Size: 9118 |
Author: lipei |
Hits:
Description: 一个quicksort的算法 有关数据结构的-a quicksort algorithm data structure
Platform: |
Size: 1096 |
Author: fang |
Hits:
Description: 1)实现以下常用的内部排序算法并对它们的时间效率进行比较:
必做(6种):起泡排序、直接插入排序、简单选择排序、快速排序、希尔排序、堆排序;
选做:折半插入、二路归并、基数排序等等;
2)函数首部要求:void XXXXSort(char **list, int len, int n, int *c, int *s)
其中:
a) XXXXSort为排序函数名,具体如下:
起泡排序BubbleSort
直接插入排序InsertSort
简单选择排序SelectSort
快速排序QuickSort
希尔排序ShellSort
堆排序HeapSort
折半插入BInsertSort
二路归并Merge2Sort
基数排序RadixSort
b) list为二维字符数组的头指针,该二维数组的规格为:char list[n][len] 每行用于存放一个字符串(最大长度为len-1),共n行;
c) c用于返回关键字比较次数;
d) s用于返回移动次数;
3)要求把各种排序函数做成函数库(文件名统一为:sort.c),用统一提供的主程序进行调用和测评。
-a) achieve the following commonly used internal sorting algorithm as well as their time efficiency comparison : regimen (6) : bubble sort, direct insertion sequence and simple choice sorting, quick sort, Hill, ranked Heap Sort; elected to do : half of insertion, two-way merge. Sort base, and so on; 2) function first requirement : void XXXXSort (char ** list, int len, int n, int * c, int * s) which : a) XXXXSort sort of a function name, as follows : bubble sort BubbleSort direct insertion sort InsertSort simple choice ranking Sele ctSort Quick Sort QuickSort Hill Sorting ShellSort Heap Sort HeapS ort half insert BInsertSort two-way merge Merge2Sort radix sort Radi xSort b) list for the two-dimensional array of characters in the first indicator, the two-dimensional array specifications : cha
Platform: |
Size: 10289 |
Author: 战天 |
Hits:
Description: 字符的快速排序算法.zip-characters quicksort algorithm. Zip
Platform: |
Size: 18147 |
Author: 辛本胜 |
Hits:
Description: 快速排序! 经典的算法。 provides methods to sort a set of objects with quicksort algorithm.-rapid sequencing! The classical algorithm. Provides methods to sort a set of objects with quicksort algorithm.
Platform: |
Size: 1346 |
Author: 李军 |
Hits:
Description: 这是快速排序的源代码,可以输出每一趟的排序结果,有助于理解整个排序过程的思想算法。
Platform: |
Size: 16006 |
Author: Iris |
Hits:
Description: 比快速排序更快的排序算法;这个了示例包含多种数据结构的算法,如InsertSort,ShellSort,BubbleSort,SelectSort,BinaryInsertSort,TableInsertSort,QuickSort,CoutingSort。对于每个算法用1万个数据比较排序性能,并且使用精确计时器(精度远远大于ms,到达us),使用正序,逆序,随机序列进行比较性能分析。
Platform: |
Size: 127327 |
Author: 人民币 |
Hits:
Description: QuickSort,SelectSort用Eclipse实现
Platform: |
Size: 3330 |
Author: 吕明涛 |
Hits:
Description: 随机生成500个数字并进行快速排序,能够显示排序所用的时间。是算法设计与分析的一道课后题。
Platform: |
Size: 1562 |
Author: 飞飞 |
Hits:
Description: 实验4:快速排序的设计
1、实验目的:掌握快速排序基本方法和过程。
2、实验要求:采用快速排序方法对输入的数据按升序和降序两种顺序进行排序,并显示中间排序的过程。
注意!所有实验要求先写出算法的思路、算法及程序;实验室上机时只是上机调试!每个实验一份实验报告。
Platform: |
Size: 49297 |
Author: 用途解放 |
Hits:
Description: 四种排序算法quicksort,heapsort,radixsort,mergesort的时间比较测试
Platform: |
Size: 2635 |
Author: dk liu |
Hits:
Description: 熟悉快速排序法的基本思想,掌握快速排序法的排序过程及其实现算法
Platform: |
Size: 7976 |
Author: 燕 |
Hits:
Description: 快速排序思想:
在待排序的n个记录中任取一个记录(通常取第一个记录),把所有小于该记录的记录移到其左边,把所有大于该记录的记录移到其右边,所选记录正好处在其应在的位置,且把原有序列划分成两个子序列。然后,对两个子序列分别重复上述过程,直到所有记录都排好序。把当前参加排序的记录按第一个记录的排序码分成前后两个部分的过程称为一趟快速排序。
Platform: |
Size: 600 |
Author: 燕 |
Hits:
«
1
2
...
5
6
7
8
9
1011
12
13
14
15
...
34
»