摘要:// MergeSort.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include void MergeSort(int* a, int iLen); void MergePass(int* a, int* aa, int subLength, int iLen);...
阅读全文
摘要:// HeapSort.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include void DirectSelectSort(int* a, int iLen); void HeapSort(int* a, int iLen); void FilterDown(in...
阅读全文
摘要:#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...
阅读全文
摘要:// 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)...
阅读全文
摘要:// 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...
阅读全文
摘要:// 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...
阅读全文
摘要:#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...
阅读全文
摘要:#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...
阅读全文
摘要:demonstrates an O(n2) method to remove the duplicated elements in an array// caution: 1. don't try to return int[] array from a function, c++ doesn't support this, though c# does it well.// ...
阅读全文