![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C/C++程序设计基础
lczyq1314
这个作者很懒,什么都没留下…
展开
-
冒泡选择插入排序
/*for( i=0;i<MAX;i++) //冒泡排序 { status=0; for(j=MAX-1;j>i;j--) if(_Array[j]>_Array[j-1]) { temp=_Array[j-1]; _Array[j-1]=_Array[j]; _Array[j]=t原创 2012-11-29 15:53:06 · 313 阅读 · 0 评论 -
插入排序
#include using namespace std; void InsertSort(int[],const int); int main() { int array[]={3,8,6,15,2,7,9}; InsertSort(array,7); return 0; } void InsertSort(int a[],const int arrayLeng原创 2012-11-29 15:09:02 · 299 阅读 · 0 评论 -
DFS and BFS
#include #include #include using namespace std; class Graph { private: int **eage; int n; int e; int *visted; queue intq; public: Graph(int n,int e);原创 2012-11-30 02:35:18 · 417 阅读 · 0 评论 -
快速排序
#include using namespace std; /*QuickSort*/int Parttion(int a[],int low,int high);void QuickSort(int a[],int low,int high);void exchange(int &x,int &y); int main() { int array[]={0,5,8,9,12,1}; i原创 2012-11-26 00:47:22 · 296 阅读 · 0 评论 -
计数排序
#include using namespace std; void main() { const int Array[6]={62,98,84,96,61,47}; int SetPos[6]={0}; int NewArray[6]; for(int i=0;i<5;i++) for(int j=i+1;j<6;j++) { if(Array[i]>Array[j])原创 2013-01-02 19:32:27 · 281 阅读 · 0 评论