| 文件名 | 文件描述 | 浏览 |
| ◆ ANSI_ISO.htm |
Fast, small, qsort()-compatible Shell sort. 快速的小型排序函数 |
浏览 |
| ◆ Basic Sorts.htm |
Great introduction for beginners to different sorts... Implements functions for a MinSort, BubbleSort, InsertionSort and ShellSort. All on an array of chars, with a specified complexity for each one. Good for beginners to study 不同排序方法的介绍 |
浏览 |
| ◆ Bubblesort.htm |
This is a great and simple demonstration of how to implement several extremely popular sorting algorithms using C++. The source includes complete code for the bubbleSort, selectionSort, and insertionSort algorithms. The code also demonstrates how to use enums and structs, as well as how to use them as function parameters and return values. The code currently returns a struct containing information pertaining to each call to a sorting function (ie. number of comparisons, assignments, or swaps), but can be easily modified to return other values. Once again, I've used Hungarian notation throughout the code, for any examples or questions see my source for the Linked List with sorting methods, also in this sorting category. There is a brief description of Hungarian notation included with the code! 怎样用C++来执行几个典型的排序算法 |
浏览 |
| ◆ File Character_EOL Counter.htm |
The program counts the number of characters and end of line characters in a document, generally used on .htm files 文件字符计数器 |
浏览 |
| ◆ Insertion Sort.htm |
Program Utilizing Insertion Sort Algorithm. http://users.neca.com/jboxall/ja05011.htm 实现插入排序算法的程序 |
浏览 |
| ◆ Insertion sort function.htm |
isort() -- insertion sort by Raymond Gardner. qsort() compatible, but uses insertion sort algorithm 插入排序函数isort() |
浏览 |
| ◆ Linked list mergesort.htm |
Here's an example of how to sort a singly-linked list. I think it can be modified to sort a doubly-linked list, but it would get a bit more complicated. Note that this is a recursive method, but the recursion depth is limited to be proportional to the base 2 log of the length of the list, so it won't "run away" and blow the stack. 10/21/93 rdg Fixed bug -- function was okay, but called incorrectly 一个单链表排序实例 |
浏览 |
| ◆ Linked list quicksort.htm |
This is a quicksort routine to be used to sort linked-lists by Jon Guthrie 链表的快速排序 |
浏览 |
| ◆ LinkedList.htm |
This is an excellent demonstation of a single linked list of integers. The source shows how to implement two classes, one for the list, and one for the nodes. Each class uses pointers and shows how to also use the Friend operator to give the list class access to the private node class's attributes. There are several member functions included in the list class. All are completely functional. They are a bubbleSort, selectionSort, and insertionSort method. The code is fairly commented and I've used Hungarian notation for all variables. That is also an excellent habit to get into, it may look strange and confusing at first, but after a small introductory period, your coding will only grow stronger as a result 包括起泡,选择和插入排序成员函数的链表 |
浏览 |
| ◆ multi-dimensional.htm |
Source code to sort a multi-dimensional array. Works with MSVC++ 6.0 Not sure about other compilers 多维数组起泡排序源代码 |
浏览 |
| ◆ Non-Recursive.htm |
Sorts an array starting at base, of length nbr_elements, each element of size width_bytes, ordered via compare_function, which is called as (*compare_function)(ptr_to_element1, ptr_to_element2) and returns < 0 if element1 < element2, 0 if element1 = element2, > 0 if element1 > element2. Most refinements are due to R. Sedgewick. See "Implementing Quicksort Programs", Comm. ACM, Oct. 1978, and Corrigendum, Comm. ACM, June 1979 非递归ANSI_ISO快速排序函数 |
浏览 |
| ◆ Projectt3.htm |
You might find this useful if you are in a C++ class. It's pretty well commented. 1d array bubble sorting, switch statement menu, generating a random sample dataset. comments welcome 一维数组起泡排序 |
浏览 |
| ◆ Quicksort using huge pointers.htm |
huge qsort() -- public domain by Raymond Gardner 6/92. Tested with Borland C++ 3.0 (C mode) 使用指针的快速排序函数 |
浏览 |
| ◆ Radix Sort.htm |
This is a radix sort, an extermly fast sort for integer data types: char, int, and long. The sample program using the radix sort sorts an array of 80,000 random integers, and writes the sorted numbers to a text file 用于整数类型的基数排序函数 |
浏览 |
| ◆ Recursive.htm |
Quicksort integer array by Raymond Gardner 整数数组的快速排序 |
浏览 |
| ◆ Select Sort.htm |
This will sort an array of integers using the select sort algorithm 用选择的排序算法对整数数组进行排序 |
浏览 |
| ◆ ShellSort a string array.htm |
strsort() -- Shell sort an array of string pointers via strcmp(). Written in ANSI C and optimized for size under Borland TC and BC++ 排序一个字符串指针的数组 |
浏览 |
| ◆ Sort a List of 20 Names.htm |
The user enters 20 names (or whatever) into an array and the program outputs the 20 inputs alphabetically. The program also stops and sorts what the user has entered so far if the user does not enter anything 对用户输入的20个名字的列表进行排序 |
浏览 |
| ◆ swap.htm |
This code can be used to swap two entries without using "temp"(i.e. a temporary variable) 不用"temp"临时变量来交换两个条目的代码 |
浏览 |
| ◆ Template Quick Sort.htm |
Quickly sort any number of data elements of any type into ascending or descending order 快速排序模板 |
浏览 |