会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
xiaovid
博客园
首页
新随笔
联系
订阅
管理
随笔分类 -
数据结构
五种排序算法
摘要:#include using namespace std;int a[]={3, 2, 5, 1, 4, -3, 24, 7};int *p = new int[8];void bubble_sort(int n) { for (int i = 0; i a[j]) { int tmp = a[j - 1]; a[j - 1] = a[j]; a[j] = tmp; } } }}void select_sort(int n) { for (int i...
阅读全文
posted @
2014-01-09 10:39
xiaovid
阅读(345)
评论(0)
推荐(0)
公告