sailing

Everything...

2007年1月28日

Direct Selection Sort

摘要: #include "stdafx.h" #include void DirectSelectSort(int* a, int iLen); void Swap(int* a, int index1, int index2); void PrintArray(int a[], int iLen); int _tmain(int argc, _TCHAR* argv[]) { int... 阅读全文

posted @ 2007-01-28 23:10 乌生鱼汤 阅读(201) 评论(0) 推荐(0) 编辑

Quick sort

摘要: // QuickSort.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include void QuickSortStart(int* a, int iLen); void QuickSort(int* a, int startIndex, int endIndex)... 阅读全文

posted @ 2007-01-28 22:56 乌生鱼汤 阅读(191) 评论(0) 推荐(0) 编辑

bubble sort

摘要: // BubbleSort.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include void BubbleSort(int* a, int iLen); void PrintArray(int a[], int iLen); int _tmain(int ar... 阅读全文

posted @ 2007-01-28 21:29 乌生鱼汤 阅读(138) 评论(0) 推荐(0) 编辑

shell sort

摘要: // ShellSort.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include void ShellSort(int* a, int iLen); void PrintArray(int a[], int iLen); int _tmain(int argc... 阅读全文

posted @ 2007-01-28 21:11 乌生鱼汤 阅读(264) 评论(0) 推荐(0) 编辑

直接插入排序 direct insertion sort

摘要: #include "stdafx.h" #include #include "stdio.h" void DirectInsertSort(int a[], int iLen); void PrintArray(int a[], int iLen); int _tmain(int argc, _TCHAR* argv[]) { // the first element of th... 阅读全文

posted @ 2007-01-28 20:12 乌生鱼汤 阅读(175) 评论(0) 推荐(0) 编辑

c++解决汉诺塔,显示每一步的碟子情况 C++ hanoi with trace of every step

摘要: #include "stdafx.h" #include #include void StartHanoi(int n); void Hanoi(int length, std::stack* source, std::stack* middle, std::stack* destination); void PrintStack(); void PrintAStack(std... 阅读全文

posted @ 2007-01-28 18:47 乌生鱼汤 阅读(566) 评论(0) 推荐(0) 编辑

导航