自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 折半检索算法——Binary Search

算法导论 Exercise 2.3-4#include using namespace std;int Binary_Search(int A[], int v, int l, int r){ int pos; if (r - l >= 1) { int m = (r + l) / 2; if (A[m] > v) { pos = Binary_Search(A,

2014-09-16 18:40:30 466

原创 不使用标记实现的归并排序算法——Merge Sort

未使用标记

2014-09-16 17:36:14 596

原创 归并排序算法——Merge Sort

c++实现的归并排序算法#include using namespace std;void Merge(int A[], int p, int q, int r){ int n1 = q - p + 1; int n2 = r - q; int L[10]; int R[10]; for(int i = 0; i < n1; i++)

2014-09-14 19:48:37 619

原创 选择排序算法——Selection Sort

c++实现的选择排序算法#include using namespace std;int main(){ int a[] = {3, 5, 9, 4, 1, 10, 2, 6, 13, 8, 15, 12}; int minnum ; int length = sizeof(a) / sizeof(int); for(int i=0; i < le

2014-09-14 12:35:33 562

原创 插入排序算法——Insertion Sort

#include using namespace std;int main(){ int A[] = {3, 5, 9, 4, 1, 10, 2, 6, 13, 8, 15, 12}; int i, j, key; int length = sizeof(A) / sizeof(int); for(i = 1; i < length; i++) { key = A[i];

2014-09-10 15:54:25 693

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除