• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
Mikuroro
博客园 首页 新随笔 联系 订阅 订阅 管理

2015年6月18日

面试题8:旋转数组的最小数字
摘要: //把一个数组最开始的若干个元素搬到数组的末尾。eg:{3,4,5,1,2}是{1,2,3,4,5}的旋转数组#include "stdafx.h"#include using namespace std;int MinInOrder(int data[],int index1,int index2... 阅读全文
posted @ 2015-06-18 15:28 Mikuroro 阅读(205) 评论(0) 推荐(0)
 
冒泡排序
摘要: #include "stdafx.h"#include using namespace std;void BubbleSort(int data[],int length){ int i,j; bool exchange=false; for(int i=0;i<length-1;i++) { e... 阅读全文
posted @ 2015-06-18 14:28 Mikuroro 阅读(178) 评论(0) 推荐(0)
 
快速排序
摘要: #include "stdafx.h"#include using namespace std;int RandomInRange(int start,int end);void Swap(int *p,int *q);int patition(int data[],int length,int s... 阅读全文
posted @ 2015-06-18 14:07 Mikuroro 阅读(224) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3