排序
文章平均质量分 58
wwttqq85538649
这个作者很懒,什么都没留下…
展开
-
冒泡法排序
// bubble.cpp : Defines the entry point for the console application.// #include "stdafx.h"#include"iomanip.h"#include "iostream.h" #define MAXSIZE 100//交换两个元素的值void swap(int &a,int &b){ int temp;原创 2009-10-08 21:05:00 · 414 阅读 · 0 评论 -
插入法排序
// Insert_sort.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include "iostream.h"#include "iomanip.h"#define MAXSIZE 100//插入法排序void Insert_sort(int a[],int n){ i原创 2009-10-08 21:34:00 · 433 阅读 · 0 评论 -
改进的冒泡算法
// improve_bubble.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include"iomanip.h"#include "iostream.h"#define MAXSIZE 100//交换两个元素的值void swap(int &a,int &b){ i原创 2009-10-08 21:54:00 · 356 阅读 · 0 评论 -
合并排序算法
// merge_sort.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include"iomanip.h"#include "iostream.h" #define MAXSIZE 100//合并两个有序的子数组void merge(int a[],int p,int q,i原创 2009-10-08 22:42:00 · 381 阅读 · 0 评论 -
堆栈排序
#include "stdafx.h"#include using namespace std; int count = 0;void Swap(int &a,int &b) { int temp; temp = a; a = b; b = temp;}//堆元素上移void SiftUp(int H[],int i){ bool done =false; if(i != 1) { wh原创 2009-10-14 22:49:00 · 1283 阅读 · 0 评论 -
基数排序算法
// radixsort.cpp : Defines the entry point for the console application.//// radixsort.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include "iostream"#include "m原创 2009-10-21 16:19:00 · 363 阅读 · 0 评论 -
基于递归的插入排序算法
// insert_soort_rec.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include "iostream"using namespace std;//基于递归插入排序算法 void RecursionInsert(int A[],int n) { int k原创 2009-10-21 16:59:00 · 701 阅读 · 0 评论